mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-20 20:21:09 +02:00
Update wxApp.IsDisplayAvailable to work on Wayland
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user