Skip to content
Permalink
Browse files

Notification area: error if compiling without X11 support

  • Loading branch information...
wmww authored and raveit65 committed Jan 22, 2019
1 parent 3630b20 commit d7edd93f04f56bcf60e31096593cd60653726fe0
@@ -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
@@ -25,9 +25,12 @@
#ifndef NA_GRID_H
#define NA_GRID_H

#ifdef GDK_WINDOWING_X11
#include <config.h>

#ifdef HAVE_X11
#include <gdk/gdkx.h>
#endif

#include <gtk/gtk.h>

G_BEGIN_DECLS
@@ -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);
@@ -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>

@@ -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>

@@ -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>
@@ -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>

0 comments on commit d7edd93

Please sign in to comment.
You can’t perform that action at this time.