summaryrefslogtreecommitdiff
path: root/applets/notification_area/system-tray/na-tray-child.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/notification_area/system-tray/na-tray-child.c')
-rw-r--r--applets/notification_area/system-tray/na-tray-child.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/applets/notification_area/system-tray/na-tray-child.c b/applets/notification_area/system-tray/na-tray-child.c
index 047ce517..2f8549ac 100644
--- a/applets/notification_area/system-tray/na-tray-child.c
+++ b/applets/notification_area/system-tray/na-tray-child.c
@@ -20,6 +20,11 @@
*/
#include <config.h>
+
+#ifndef HAVE_X11
+#error file should only be built when HAVE_X11 is enabled
+#endif
+
#include <string.h>
#include "na-tray-child.h"
@@ -417,6 +422,10 @@ na_tray_child_new (GdkScreen *screen,
*/
display = gdk_screen_get_display (screen);
+ if (!GDK_IS_X11_DISPLAY (display)) {
+ g_warning ("na_tray only works on X11");
+ return NULL;
+ }
gdk_x11_display_error_trap_push (display);
result = XGetWindowAttributes (xdisplay, icon_window,
&window_attributes);