summaryrefslogtreecommitdiff
path: root/typing-break/drw-break-window.c
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-19 18:29:56 +0200
committerZenWalker <[email protected]>2017-08-19 18:29:56 +0200
commit1b565937c12415d96b41eaa020450b10c50aaade (patch)
tree8dd27df624340f424fbb10fdf5269a49749bec87 /typing-break/drw-break-window.c
parent987090c5615af43301317e6cdc24d9f12bac5716 (diff)
downloadmate-control-center-1b565937c12415d96b41eaa020450b10c50aaade.tar.bz2
mate-control-center-1b565937c12415d96b41eaa020450b10c50aaade.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 'typing-break/drw-break-window.c')
-rw-r--r--typing-break/drw-break-window.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/typing-break/drw-break-window.c b/typing-break/drw-break-window.c
index 6a72f68e..e8e03952 100644
--- a/typing-break/drw-break-window.c
+++ b/typing-break/drw-break-window.c
@@ -126,6 +126,9 @@ drw_break_window_init (DrwBreakWindow *window)
gint root_monitor = 0;
GdkScreen *screen = NULL;
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkDisplay *display;
+#endif
GdkRectangle monitor;
gint sc_width;
gint sc_height;
@@ -149,7 +152,12 @@ drw_break_window_init (DrwBreakWindow *window)
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
screen = gdk_screen_get_default ();
+#if GTK_CHECK_VERSION (3, 22, 0)
+ display = gdk_screen_get_display (screen);
+ gdk_monitor_get_geometry (gdk_display_get_monitor (display, root_monitor), &monitor);
+#else
gdk_screen_get_monitor_geometry (screen, root_monitor, &monitor);
+#endif
gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL,
&sc_width, &sc_height);