summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-14 16:48:02 +0200
committerraveit65 <[email protected]>2017-08-22 07:56:34 +0200
commita5439d2175395763e06e8bec10ad7b914742882a (patch)
treeec55f353160661f547292879c6b7995af6908e7d
parentf0541e3dfda29c26fe14c9c9117f95c49006c75c (diff)
downloadmarco-a5439d2175395763e06e8bec10ad7b914742882a.tar.bz2
marco-a5439d2175395763e06e8bec10ad7b914742882a.tar.xz
gtk 3.22: avoid deprecated gdk_screen_get_monitor... functions:
avoid deprecated: gdk_screen_get_monitor_geometry gdk_screen_get_monitor_at_point
-rw-r--r--src/ui/fixedtip.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ui/fixedtip.c b/src/ui/fixedtip.c
index 688f5f1d..346b6ffa 100644
--- a/src/ui/fixedtip.c
+++ b/src/ui/fixedtip.c
@@ -67,7 +67,11 @@ meta_fixed_tip_show (int root_x, int root_y,
{
gint w;
gint h;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkMonitor *mon_num;
+#else
gint mon_num;
+#endif
GdkRectangle monitor;
gint screen_right_edge;
@@ -110,8 +114,13 @@ meta_fixed_tip_show (int root_x, int root_y,
G_CALLBACK (gtk_widget_destroyed), &tip);
}
+#if GTK_CHECK_VERSION (3, 22, 0)
+ mon_num = gdk_display_get_monitor_at_point (gdk_screen_get_display (screen), root_x, root_y);
+ gdk_monitor_get_geometry (mon_num, &monitor);
+#else
mon_num = gdk_screen_get_monitor_at_point (screen, root_x, root_y);
gdk_screen_get_monitor_geometry (screen, mon_num, &monitor);
+#endif
screen_right_edge = monitor.x + monitor.width;
gtk_label_set_markup (GTK_LABEL (label), markup_text);