Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
panel-force-quit: Error if used when X11 is disabled
  • Loading branch information
wmww authored and lukefromdc committed Jan 29, 2019
1 parent db9a60c commit 4fe2b74
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mate-panel/panel-force-quit.c
Expand Up @@ -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>
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions mate-panel/panel-force-quit.h
Expand Up @@ -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
Expand Down

0 comments on commit 4fe2b74

Please sign in to comment.