Skip to content

Commit

Permalink
Update wxApp.IsDisplayAvailable to work on Wayland
Browse files Browse the repository at this point in the history
  • Loading branch information
swt2c committed Nov 8, 2024
1 parent 41823e3 commit 57fd215
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 57fd215

Please sign in to comment.