diff options
author | William Wold <[email protected]> | 2019-01-26 04:25:21 -0500 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-01-29 15:20:59 +0100 |
commit | d71479299f7a134a2de6d187535edb3a04441095 (patch) | |
tree | 4cd7f6c0fd670e5756e129501967aef633b36b14 | |
parent | aa4754cf5a232842ff25cdcb34d098bfab9ee861 (diff) | |
download | mate-panel-d71479299f7a134a2de6d187535edb3a04441095.tar.bz2 mate-panel-d71479299f7a134a2de6d187535edb3a04441095.tar.xz |
Clock: Wayland support
-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 |