diff options
author | ZenWalker <[email protected]> | 2017-08-18 02:57:02 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2017-08-26 16:28:58 +0200 |
commit | 6f213290fe740621fc4d3f8bf20cbc6b47f5ea0c (patch) | |
tree | 7db1a166fa88ae28d7273cb3a2e07cc0c7ef2b3a /trashapplet/src | |
parent | 5126a9a1dedddf14a53f16d12a7215aab75907d4 (diff) | |
download | mate-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/src')
-rw-r--r-- | trashapplet/src/xstuff.c | 16 |
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, |