Skip to content

Commit

Permalink
Make another adjustment to glXQueryExtensions
Browse files Browse the repository at this point in the history
Use GDK/GTK to get the X display instead of glXGetCurrentDisplay().

For #985.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
  • Loading branch information
rkitover committed Aug 9, 2022
1 parent 643ec0f commit 236cffb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/wx/panel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
#include <cstring>
#include <vector>

#if defined(__WXGTK__) && defined(HAVE_XSS)
#ifdef __WXGTK__
#include <X11/Xlib.h>
#define Status int
#include <X11/extensions/scrnsaver.h>
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#ifdef HAVE_XSS
#include <X11/extensions/scrnsaver.h>
#endif
#endif

#include <wx/dcbuffer.h>
Expand Down Expand Up @@ -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));

Expand Down

0 comments on commit 236cffb

Please sign in to comment.