Update wxApp.IsDisplayAvailable to work on Wayland

This commit is contained in:
Scott Talbert
2024-11-07 20:37:45 -05:00
parent 41823e3458
commit 57fd2156f5

View File

@@ -1,6 +1,5 @@
#ifdef __WXGTK__
#include <gdk/gdkx.h>
#include <gtk/gtk.h>
#endif
@@ -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