summaryrefslogtreecommitdiff
path: root/trashapplet
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-18 02:57:02 +0200
committerraveit65 <[email protected]>2017-08-26 16:28:58 +0200
commit6f213290fe740621fc4d3f8bf20cbc6b47f5ea0c (patch)
tree7db1a166fa88ae28d7273cb3a2e07cc0c7ef2b3a /trashapplet
parent5126a9a1dedddf14a53f16d12a7215aab75907d4 (diff)
downloadmate-applets-6f213290fe740621fc4d3f8bf20cbc6b47f5ea0c.tar.bz2
mate-applets-6f213290fe740621fc4d3f8bf20cbc6b47f5ea0c.tar.xz
gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions:
avoid deprecated: gdk_screen_get_monitor_geometry gdk_screen_get_monitor_at_window
Diffstat (limited to 'trashapplet')
-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,