summaryrefslogtreecommitdiff
path: root/applets/notification_area/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'applets/notification_area/main.c')
-rw-r--r--applets/notification_area/main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/applets/notification_area/main.c b/applets/notification_area/main.c
index 8d97ee59..8f8db2ff 100644
--- a/applets/notification_area/main.c
+++ b/applets/notification_area/main.c
@@ -22,6 +22,11 @@
*/
#include <config.h>
+
+#ifndef HAVE_X11
+#error file should only be built when HAVE_X11 is enabled
+#endif
+
#include <string.h>
#include <mate-panel-applet.h>
@@ -496,6 +501,11 @@ applet_factory (MatePanelApplet *applet,
strcmp (iid, "SystemTrayApplet") == 0))
return FALSE;
+ if (!GDK_IS_X11_DISPLAY (gtk_widget_get_display (GTK_WIDGET (applet)))) {
+ g_warning ("Notification area only works on X");
+ return FALSE;
+ }
+
#ifndef NOTIFICATION_AREA_INPROCESS
gtk_window_set_default_icon_name (NOTIFICATION_AREA_ICON);
#endif