diff --git a/gtk/inspector/general.c b/gtk/inspector/general.c index ad52422fa3..f456ea0da4 100644 --- a/gtk/inspector/general.c +++ b/gtk/inspector/general.c @@ -45,12 +45,12 @@ #ifdef GDK_WINDOWING_WIN32 #include "win32/gdkwin32.h" +#include "gdkglcontextprivate.h" #include -#endif - #ifdef GDK_WIN32_ENABLE_EGL #include #endif +#endif #ifdef GDK_WINDOWING_MACOS #include "macos/gdkmacos.h" @@ -387,7 +387,8 @@ init_gl (GtkInspectorGeneral *gen) else #endif #ifdef GDK_WINDOWING_WIN32 - if (GDK_IS_WIN32_DISPLAY (gen->display)) + if (GDK_IS_WIN32_DISPLAY (gen->display) && + gdk_gl_backend_can_be_used (GDK_GL_WGL, NULL)) { int gl_version; char *version;