Skip to content
Permalink
Browse files

Clock: Wayland support

  • Loading branch information...
wmww authored and raveit65 committed Jan 26, 2019
1 parent aa4754c commit d71479299f7a134a2de6d187535edb3a04441095
Showing with 9 additions and 2 deletions.
  1. +0 −1 applets/clock/clock-location-tile.c
  2. +9 −1 applets/clock/clock.c
@@ -7,7 +7,6 @@

#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <gdk/gdkx.h>

#include "clock.h"
#include "clock-face.h"
@@ -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

0 comments on commit d714792

Please sign in to comment.
You can’t perform that action at this time.