summaryrefslogtreecommitdiff
path: root/applets/notification_area/system-tray
diff options
context:
space:
mode:
Diffstat (limited to 'applets/notification_area/system-tray')
-rw-r--r--applets/notification_area/system-tray/na-tray-child.c9
-rw-r--r--applets/notification_area/system-tray/na-tray-child.h7
-rw-r--r--applets/notification_area/system-tray/na-tray-manager.c5
-rw-r--r--applets/notification_area/system-tray/na-tray.c5
-rw-r--r--applets/notification_area/system-tray/na-tray.h4
5 files changed, 29 insertions, 1 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);
diff --git a/applets/notification_area/system-tray/na-tray-child.h b/applets/notification_area/system-tray/na-tray-child.h
index 6641fe88..aa39658a 100644
--- a/applets/notification_area/system-tray/na-tray-child.h
+++ b/applets/notification_area/system-tray/na-tray-child.h
@@ -23,7 +23,14 @@
#ifndef __NA_TRAY_CHILD_H__
#define __NA_TRAY_CHILD_H__
+#include <config.h>
+
+#ifndef HAVE_X11
+#error file should only be included when HAVE_X11 is enabled
+#endif
+
#include <gtk/gtk.h>
+
#include <gdk/gdkx.h>
#include <gtk/gtkx.h>
diff --git a/applets/notification_area/system-tray/na-tray-manager.c b/applets/notification_area/system-tray/na-tray-manager.c
index 3886a10d..4e137b25 100644
--- a/applets/notification_area/system-tray/na-tray-manager.c
+++ b/applets/notification_area/system-tray/na-tray-manager.c
@@ -21,6 +21,11 @@
*/
#include <config.h>
+
+#ifndef HAVE_X11
+#error file should only be built when HAVE_X11 is enabled
+#endif
+
#include <string.h>
#include <libintl.h>
diff --git a/applets/notification_area/system-tray/na-tray.c b/applets/notification_area/system-tray/na-tray.c
index 621d534d..bbf380c2 100644
--- a/applets/notification_area/system-tray/na-tray.c
+++ b/applets/notification_area/system-tray/na-tray.c
@@ -21,6 +21,11 @@
*/
#include <config.h>
+
+#ifndef HAVE_X11
+#error file should only be built when HAVE_X11 is enabled
+#endif
+
#include <string.h>
#include <gtk/gtk.h>
diff --git a/applets/notification_area/system-tray/na-tray.h b/applets/notification_area/system-tray/na-tray.h
index 8eaca36e..9f9d2bef 100644
--- a/applets/notification_area/system-tray/na-tray.h
+++ b/applets/notification_area/system-tray/na-tray.h
@@ -24,7 +24,9 @@
#ifndef __NA_TRAY_H__
#define __NA_TRAY_H__
-#ifdef GDK_WINDOWING_X11
+#include <config.h>
+
+#ifdef HAVE_X11
#include <gdk/gdkx.h>
#endif
#include <gtk/gtk.h>