diff options
author | William Wold <[email protected]> | 2019-01-26 05:33:08 -0500 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-01-29 19:09:05 +0000 |
commit | 4fe2b74e7bb8e578d68a2e6966ba096a96908ebf (patch) | |
tree | aa4b3ff0537761807e02fac1572fd261ae9c28ff | |
parent | db9a60cb179c7d34931609db20763d79dd58ad8e (diff) | |
download | mate-panel-4fe2b74e7bb8e578d68a2e6966ba096a96908ebf.tar.bz2 mate-panel-4fe2b74e7bb8e578d68a2e6966ba096a96908ebf.tar.xz |
panel-force-quit: Error if used when X11 is disabled
-rw-r--r-- | mate-panel/panel-force-quit.c | 6 | ||||
-rw-r--r-- | mate-panel/panel-force-quit.h | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/mate-panel/panel-force-quit.c b/mate-panel/panel-force-quit.c index 6603597b..82a67010 100644 --- a/mate-panel/panel-force-quit.c +++ b/mate-panel/panel-force-quit.c @@ -24,6 +24,10 @@ #include <config.h> +#ifndef HAVE_X11 +#error file should only be built when HAVE_X11 is enabled +#endif + #include "panel-force-quit.h" #include <glib/gi18n.h> @@ -335,6 +339,8 @@ panel_force_quit (GdkScreen *screen, GdkDisplay *display; GdkSeat *seat; + g_return_if_fail (GDK_IS_X11_DISPLAY (gdk_screen_get_display (screen))); + popup = display_popup_window (screen); root = gdk_screen_get_root_window (screen); diff --git a/mate-panel/panel-force-quit.h b/mate-panel/panel-force-quit.h index 77c1c3cc..4f7d5851 100644 --- a/mate-panel/panel-force-quit.h +++ b/mate-panel/panel-force-quit.h @@ -25,6 +25,12 @@ #ifndef __PANEL_FORCE_QUIT_H__ #define __PANEL_FORCE_QUIT_H__ +#ifdef PACKAGE_NAME // only check HAVE_X11 if config.h has been included +#ifndef HAVE_X11 +#error file should only be included when HAVE_X11 is enabled +#endif +#endif + #include <gdk/gdk.h> #ifdef __cplusplus |