summaryrefslogtreecommitdiff
path: root/eel
diff options
context:
space:
mode:
authorZenWalker <[email protected]>2017-08-18 19:18:51 +0200
committerraveit65 <[email protected]>2017-08-25 23:03:59 +0200
commit2ff07dcba10019455d0d8c2762c897de6247ac4d (patch)
treefba9112997eae0815d531f3a2604f636a55af559 /eel
parent2a424fca8bd928223e92570fa692266c471a52b3 (diff)
downloadcaja-2ff07dcba10019455d0d8c2762c897de6247ac4d.tar.bz2
caja-2ff07dcba10019455d0d8c2762c897de6247ac4d.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 'eel')
-rw-r--r--eel/eel-background.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c
index 9fbd894b..57e9d656 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -945,7 +945,12 @@ eel_background_is_dark (EelBackground *self)
/* only check for the background on the 0th monitor */
GdkScreen *screen = gdk_screen_get_default ();
+#if GTK_CHECK_VERSION (3, 22, 0)
+ GdkDisplay *display = gdk_screen_get_display (screen);
+ gdk_monitor_get_geometry (gdk_display_get_monitor (display, 0), &rect);
+#else
gdk_screen_get_monitor_geometry (screen, 0, &rect);
+#endif
return mate_bg_is_dark (self->details->bg, rect.width, rect.height);
}