diff options
Diffstat (limited to 'applets/clock')
-rw-r--r-- | applets/clock/clock-location-tile.c | 1 | ||||
-rw-r--r-- | applets/clock/clock.c | 10 |
2 files changed, 9 insertions, 2 deletions
diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index 33c529ec..351e8c69 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -7,7 +7,6 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> -#include <gdk/gdkx.h> #include "clock.h" #include "clock-face.h" diff --git a/applets/clock/clock.c b/applets/clock/clock.c index ef43fd8f..afe39421 100644 --- a/applets/clock/clock.c +++ b/applets/clock/clock.c @@ -49,9 +49,12 @@ #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#include <gdk/gdkx.h> #include <gio/gio.h> +#ifdef HAVE_X11 +#include <gdk/gdkx.h> +#endif + #include <libmateweather/mateweather-prefs.h> #include <libmateweather/location-entry.h> #include <libmateweather/timezone-menu.h> @@ -848,6 +851,7 @@ create_calendar (ClockData *cd) static void position_calendar_popup (ClockData *cd) { +#ifdef HAVE_X11 GtkRequisition req; GtkAllocation allocation; GdkDisplay *display; @@ -860,6 +864,9 @@ position_calendar_popup (ClockData *cd) int i, n; gboolean found_monitor = FALSE; + if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ())) + return; + /* Get root origin of the toggle button, and position above that. */ gdk_window_get_origin (gtk_widget_get_window (cd->panel_button), &x, &y); @@ -943,6 +950,7 @@ position_calendar_popup (ClockData *cd) gtk_window_move (GTK_WINDOW (cd->calendar_popup), x, y); gtk_window_set_gravity (GTK_WINDOW (cd->calendar_popup), gravity); +#endif } static void |