diff options
author | ZenWalker <[email protected]> | 2017-08-21 00:31:05 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2017-08-21 00:32:47 +0200 |
commit | ac12e6d16f4a51b3327d013781e72cfec17f3624 (patch) | |
tree | 3a433e02bd79418dd9597e6600ed65a01502323d /eel/eel-background.c | |
parent | 67fb07d8b333ff4affae7ca5b37366652dad937d (diff) | |
download | caja-ac12e6d16f4a51b3327d013781e72cfec17f3624.tar.bz2 caja-ac12e6d16f4a51b3327d013781e72cfec17f3624.tar.xz |
Fix: Scaling the desktop wallpaper doesn't work
Fixes https://github.com/mate-desktop/caja/pull/824#issuecomment-323568583
Diffstat (limited to 'eel/eel-background.c')
-rw-r--r-- | eel/eel-background.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/eel/eel-background.c b/eel/eel-background.c index b096650a..9fbd894b 100644 --- a/eel/eel-background.c +++ b/eel/eel-background.c @@ -311,13 +311,17 @@ drawable_get_adjusted_size (EelBackground *self, { if (self->details->is_desktop) { - gint sc_width, sc_height; +#if GTK_CHECK_VERSION (3, 22, 0) + GdkRectangle geometry; + gdk_monitor_get_geometry (gdk_display_get_primary_monitor (gtk_widget_get_display (self->details->widget)), + &geometry); + *width = geometry.width; + *height = geometry.height; +#else GdkScreen *screen = gtk_widget_get_screen (self->details->widget); - - gdk_window_get_geometry (gdk_screen_get_root_window (screen), NULL, NULL, - &sc_width, &sc_height); - *width = sc_width; - *height = sc_height; + *width = gdk_screen_get_width (screen); + *height = gdk_screen_get_height (screen); +#endif } else { |