Skip to content

Commit

Permalink
Merge pull request #2638 from swt2c/isdisplayavailable_wayland
Browse files Browse the repository at this point in the history
Update wxApp.IsDisplayAvailable to work on Wayland
  • Loading branch information
swt2c authored Nov 8, 2024
2 parents 41823e3 + 57fd215 commit 45871c2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/app_ex.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

#ifdef __WXGTK__
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#endif

Expand Down Expand Up @@ -299,11 +298,11 @@ int wxPyApp::MainLoop()
bool wxPyApp::IsDisplayAvailable()
{
#ifdef __WXGTK__
Display* display;
display = XOpenDisplay(NULL);
GdkDisplay* display;
display = gdk_display_open(NULL);
if (display == NULL)
return false;
XCloseDisplay(display);
gdk_display_close(display);
return true;
#endif

Expand Down

0 comments on commit 45871c2

Please sign in to comment.