diff options
-rw-r--r-- | mate-panel/panel-layout.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/mate-panel/panel-layout.c b/mate-panel/panel-layout.c index ab051e96..d550af97 100644 --- a/mate-panel/panel-layout.c +++ b/mate-panel/panel-layout.c @@ -28,7 +28,10 @@ #include <glib.h> #include <gio/gio.h> + +#ifdef HAVE_X11 #include <gdk/gdkx.h> +#endif #include <libmate-desktop/mate-dconf.h> #include <libmate-desktop/mate-gsettings.h> @@ -321,7 +324,12 @@ panel_layout_apply_default_from_gkeyfile (GdkScreen *screen) GError *error = NULL; int i; - screen_n = gdk_x11_screen_get_screen_number (screen); + screen_n = 0; +#ifdef HAVE_X11 + if (GDK_IS_X11_SCREEN (screen)) + screen_n = gdk_x11_screen_get_screen_number (screen); +#endif // HAVE_11 + layout_file = panel_layout_filename(); if (layout_file) |