summaryrefslogtreecommitdiff
path: root/applets/clock/clock.c
diff options
context:
space:
mode:
authorWilliam Wold <[email protected]>2019-01-26 04:25:21 -0500
committerraveit65 <[email protected]>2019-01-29 15:20:59 +0100
commitd71479299f7a134a2de6d187535edb3a04441095 (patch)
tree4cd7f6c0fd670e5756e129501967aef633b36b14 /applets/clock/clock.c
parentaa4754cf5a232842ff25cdcb34d098bfab9ee861 (diff)
downloadmate-panel-d71479299f7a134a2de6d187535edb3a04441095.tar.bz2
mate-panel-d71479299f7a134a2de6d187535edb3a04441095.tar.xz
Clock: Wayland support
Diffstat (limited to 'applets/clock/clock.c')
-rw-r--r--applets/clock/clock.c10
1 files changed, 9 insertions, 1 deletions
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