summaryrefslogtreecommitdiff
path: root/eel/eel-background.c
diff options
context:
space:
mode:
Diffstat (limited to 'eel/eel-background.c')
-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);
}