summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Wold <[email protected]>2019-02-11 15:46:32 -0500
committerraveit65 <[email protected]>2019-03-10 15:11:45 +0100
commit649d1293174715573d5ef29dbdaefc0fb2466a1d (patch)
tree6e6e7608b4ab38dd3a24424246164b114ba2ad24
parentd602706d8c6486a3f2b43535b3b3b3407b44e882 (diff)
downloadmate-panel-649d1293174715573d5ef29dbdaefc0fb2466a1d.tar.bz2
mate-panel-649d1293174715573d5ef29dbdaefc0fb2466a1d.tar.xz
Wayland support for panel-applet-frame.c
-rw-r--r--mate-panel/panel-applet-frame.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/mate-panel/panel-applet-frame.c b/mate-panel/panel-applet-frame.c
index 5b4b96c9..f795ed1e 100644
--- a/mate-panel/panel-applet-frame.c
+++ b/mate-panel/panel-applet-frame.c
@@ -31,7 +31,6 @@
#include <gio/gio.h>
#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
#include <libpanel-util/panel-gtk.h>
@@ -43,7 +42,9 @@
#include "panel-background.h"
#include "panel-lockdown.h"
#include "panel-stock-icons.h"
+#ifdef HAVE_X11
#include "xstuff.h"
+#endif
#include "panel-schemas.h"
#include "panel-applet-frame.h"
@@ -746,8 +747,10 @@ _mate_panel_applet_frame_applet_broken (MatePanelAppletFrame *frame)
screen = gtk_widget_get_screen (GTK_WIDGET (frame));
- if (xstuff_is_display_dead ())
+#ifdef HAVE_X11
+ if (is_using_x11 () && xstuff_is_display_dead ())
return;
+#endif
if (frame->priv->iid) {
MatePanelAppletInfo *info;
@@ -800,8 +803,15 @@ _mate_panel_applet_frame_applet_broken (MatePanelAppletFrame *frame)
gtk_widget_show (dialog);
- gtk_window_present_with_time (GTK_WINDOW (dialog),
- gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (dialog))));
+#ifdef HAVE_X11
+ if (GDK_IS_X11_DISPLAY (gtk_widget_get_display (dialog)))
+ gtk_window_present_with_time (GTK_WINDOW (dialog),
+ gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (dialog))));
+ else
+#endif
+ { // Not using X11
+ gtk_window_present(GTK_WINDOW (dialog));
+ }
g_free (dialog_txt);
}