Group :: Graphical desktop/MATE
RPM: mate-file-manager
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: caja_0001-make-sure-scaling-the-desktop-wallpaper-works-in-all.patch
Download
Download
From 3063876faf0e2bcbba03264a4a907f1e4e373196 Mon Sep 17 00:00:00 2001
From: ZenWalker <scow@riseup.net>
Date: Mon, 28 Aug 2017 03:33:41 +0200
Subject: [PATCH] make sure scaling the desktop wallpaper works in all monitors
Fixes #836
---
eel/eel-background.c | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/eel/eel-background.c b/eel/eel-background.c
index 57e9d65..a3392c2 100644
--- a/eel/eel-background.c
+++ b/eel/eel-background.c
@@ -313,10 +313,26 @@ drawable_get_adjusted_size (EelBackground *self,
{
#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;
+ GdkMonitor *monitor;
+ GdkDisplay *display;
+ int n = 0;
+ int i = 0;
+ int sc_width = 0;
+ int sc_height = 0;
+
+ display = gtk_widget_get_display (self->details->widget);
+ n = gdk_display_get_n_monitors (display);
+
+ for (i = 0; i < n; ++i)
+ {
+ monitor = gdk_display_get_monitor (display, i);
+ gdk_monitor_get_geometry (monitor, &geometry);
+ sc_width = sc_width + geometry.width;
+ sc_height = sc_height + geometry.height;
+ }
+
+ *width = sc_width;
+ *height = sc_height;
#else
GdkScreen *screen = gtk_widget_get_screen (self->details->widget);
*width = gdk_screen_get_width (screen);
--
2.13.5