File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change 77
88#include <glib/gi18n.h>
99#include <gtk/gtk.h>
10- #include <gdk/gdkx.h>
1110
1211#include "clock.h"
1312#include "clock-face.h"
Original file line number Diff line number Diff line change 4949
5050#include <gtk/gtk.h>
5151#include <gdk/gdkkeysyms.h>
52- #include <gdk/gdkx.h>
5352#include <gio/gio.h>
5453
54+ #ifdef HAVE_X11
55+ #include <gdk/gdkx.h>
56+ #endif
57+
5558#include <libmateweather/mateweather-prefs.h>
5659#include <libmateweather/location-entry.h>
5760#include <libmateweather/timezone-menu.h>
@@ -848,6 +851,7 @@ create_calendar (ClockData *cd)
848851static void
849852position_calendar_popup (ClockData * cd )
850853{
854+ #ifdef HAVE_X11
851855 GtkRequisition req ;
852856 GtkAllocation allocation ;
853857 GdkDisplay * display ;
@@ -860,6 +864,9 @@ position_calendar_popup (ClockData *cd)
860864 int i , n ;
861865 gboolean found_monitor = FALSE;
862866
867+ if (!GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
868+ return ;
869+
863870 /* Get root origin of the toggle button, and position above that. */
864871 gdk_window_get_origin (gtk_widget_get_window (cd -> panel_button ),
865872 & x , & y );
@@ -943,6 +950,7 @@ position_calendar_popup (ClockData *cd)
943950
944951 gtk_window_move (GTK_WINDOW (cd -> calendar_popup ), x , y );
945952 gtk_window_set_gravity (GTK_WINDOW (cd -> calendar_popup ), gravity );
953+ #endif
946954}
947955
948956static void
You can’t perform that action at this time.
0 commit comments