summaryrefslogtreecommitdiff
path: root/trashapplet/src
diff options
context:
space:
mode:
Diffstat (limited to 'trashapplet/src')
-rw-r--r--trashapplet/src/xstuff.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/trashapplet/src/xstuff.c b/trashapplet/src/xstuff.c
index ae1a643a..5255bf0d 100644
--- a/trashapplet/src/xstuff.c
+++ b/trashapplet/src/xstuff.c
@@ -150,10 +150,14 @@ draw_zoom_animation (GdkScreen *gscreen,
void
xstuff_zoom_animate (GtkWidget *widget, GdkRectangle *opt_rect)
{
- GdkScreen *gscreen;
- GdkRectangle rect, dest;
+ GdkScreen *gscreen;
+ GdkRectangle rect, dest;
GtkAllocation allocation;
- int monitor;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkMonitor *monitor;
+#else
+ int monitor;
+#endif
if (opt_rect)
rect = *opt_rect;
@@ -169,8 +173,14 @@ xstuff_zoom_animate (GtkWidget *widget, GdkRectangle *opt_rect)
}
gscreen = gtk_widget_get_screen (widget);
+#if GTK_CHECK_VERSION (3, 22, 0)
+ monitor = gdk_display_get_monitor_at_window (gdk_screen_get_display (gscreen),
+ gtk_widget_get_window (widget));
+ gdk_monitor_get_geometry (monitor, &dest);
+#else
monitor = gdk_screen_get_monitor_at_window (gscreen, gtk_widget_get_window (widget));
gdk_screen_get_monitor_geometry (gscreen, monitor, &dest);
+#endif
draw_zoom_animation (gscreen,
rect.x, rect.y, rect.width, rect.height,