diff --git a/src/wx/panel.cpp b/src/wx/panel.cpp index 76594e86..07770f54 100644 --- a/src/wx/panel.cpp +++ b/src/wx/panel.cpp @@ -3,12 +3,14 @@ #include #include -#if defined(__WXGTK__) && defined(HAVE_XSS) +#ifdef __WXGTK__ #include #define Status int - #include #include #include +#ifdef HAVE_XSS + #include +#endif #endif #include @@ -2170,7 +2172,7 @@ void GLDrawingPanel::DrawingPanelInit() static PFNGLXSWAPINTERVALSGIPROC glXSwapIntervalSGI = NULL; static PFNGLXSWAPINTERVALMESAPROC glXSwapIntervalMESA = NULL; - auto display = glXGetCurrentDisplay(); + auto display = GDK_WINDOW_XDISPLAY(gtk_widget_get_window(wxGetApp().frame->GetHandle())); char* glxQuery = (char*)glXQueryExtensionsString(display, DefaultScreen(display));