mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2025-07-21 04:31:09 +02:00
Update wxApp.IsDisplayAvailable to work on Wayland
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
#include <gdk/gdkx.h>
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -299,11 +298,11 @@ int wxPyApp::MainLoop()
|
|||||||
bool wxPyApp::IsDisplayAvailable()
|
bool wxPyApp::IsDisplayAvailable()
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
Display* display;
|
GdkDisplay* display;
|
||||||
display = XOpenDisplay(NULL);
|
display = gdk_display_open(NULL);
|
||||||
if (display == NULL)
|
if (display == NULL)
|
||||||
return false;
|
return false;
|
||||||
XCloseDisplay(display);
|
gdk_display_close(display);
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user