summaryrefslogtreecommitdiff
path: root/mate-panel/libegg/eggsmclient-xsmp.c
diff options
context:
space:
mode:
authorWilliam Wold <[email protected]>2019-06-17 20:59:45 +0000
committerraveit65 <[email protected]>2019-06-23 10:12:24 +0200
commit873c72216713553e7b94d061de9aafbf24cac2ae (patch)
treef7029f5e557e26c1a42ba10b43f0a19856d036f8 /mate-panel/libegg/eggsmclient-xsmp.c
parentb54ee03c1b393348ee3b6af6ab3cb6b4676e87a4 (diff)
downloadmate-panel-873c72216713553e7b94d061de9aafbf24cac2ae.tar.bz2
mate-panel-873c72216713553e7b94d061de9aafbf24cac2ae.tar.xz
Wayland support for libegg
Diffstat (limited to 'mate-panel/libegg/eggsmclient-xsmp.c')
-rw-r--r--mate-panel/libegg/eggsmclient-xsmp.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mate-panel/libegg/eggsmclient-xsmp.c b/mate-panel/libegg/eggsmclient-xsmp.c
index 2b707a76..98cd85d5 100644
--- a/mate-panel/libegg/eggsmclient-xsmp.c
+++ b/mate-panel/libegg/eggsmclient-xsmp.c
@@ -37,7 +37,10 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
+
+#ifdef HAVE_X11
#include <gdk/gdkx.h>
+#endif
#define EGG_TYPE_SM_CLIENT_XSMP (egg_sm_client_xsmp_get_type ())
#define EGG_SM_CLIENT_XSMP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_SM_CLIENT_XSMP, EggSMClientXSMP))
@@ -368,7 +371,10 @@ sm_client_xsmp_startup (EggSMClient *client,
xsmp->client_id = g_strdup (ret_client_id);
free (ret_client_id);
- gdk_x11_set_sm_client_id (xsmp->client_id);
+#ifdef HAVE_X11
+ if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
+ gdk_x11_set_sm_client_id (xsmp->client_id);
+#endif
g_debug ("Got client ID \"%s\"", xsmp->client_id);
}