From 57fd2156f5c2df2ff15c5ed0f51f4fd5a1f127b2 Mon Sep 17 00:00:00 2001 From: Scott Talbert Date: Thu, 7 Nov 2024 20:37:45 -0500 Subject: [PATCH] Update wxApp.IsDisplayAvailable to work on Wayland --- src/app_ex.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/app_ex.cpp b/src/app_ex.cpp index 8b189f18c..3c0111e97 100644 --- a/src/app_ex.cpp +++ b/src/app_ex.cpp @@ -1,6 +1,5 @@ #ifdef __WXGTK__ -#include #include #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