[Xfce4-commits] <xfdesktop:eric/bugzilla-patches> Fix xinerama_stretch not refreshing on all monitors
Eric Koegel
noreply at xfce.org
Sat Mar 3 18:10:05 CET 2012
Updating branch refs/heads/eric/bugzilla-patches
to a18cb32c970f2355cfa86bf6763e31efa93e1df5 (commit)
from 1a13ea55d5d25479ec3b4e849505b32ee2193854 (commit)
commit a18cb32c970f2355cfa86bf6763e31efa93e1df5
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Sat Mar 3 16:20:29 2012 +0300
Fix xinerama_stretch not refreshing on all monitors
src/xfce-desktop.c | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 654f986..b1ad65f 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -335,8 +335,29 @@ backdrop_changed_cb(XfceBackdrop *backdrop, gpointer user_data)
pix = xfce_backdrop_get_pixbuf(backdrop);
if(!pix)
return;
-
- gdk_screen_get_monitor_geometry(gscreen, monitor, &rect);
+
+ if(desktop->priv->xinerama_stretch) {
+ GdkRectangle monitor_rect;
+
+ gdk_screen_get_monitor_geometry(gscreen, 0, &rect);
+
+ /* Get the lowest x and y value for all the monitors in
+ * case none of them start at 0,0 for whatever reason.
+ */
+ for(i = 1; i < (guint)gdk_screen_get_n_monitors(gscreen); i++) {
+ gdk_screen_get_monitor_geometry(gscreen, i, &monitor_rect);
+
+ if(monitor_rect.x < rect.x)
+ rect.x = monitor_rect.x;
+ if(monitor_rect.y < rect.y)
+ rect.y = monitor_rect.y;
+ }
+
+ rect.width = gdk_screen_get_width(gscreen);
+ rect.height = gdk_screen_get_height(gscreen);
+ } else {
+ gdk_screen_get_monitor_geometry(gscreen, monitor, &rect);
+ }
gdk_draw_pixbuf(GDK_DRAWABLE(pmap), GTK_WIDGET(desktop)->style->black_gc,
pix, 0, 0, rect.x, rect.y,
More information about the Xfce4-commits
mailing list