[Xfce4-commits] <xfce4-settings:xrandr-display-settings> Really enforce the screen size
Jérôme Guelfucci
noreply at xfce.org
Sun Jun 6 18:48:03 CEST 2010
Updating branch refs/heads/xrandr-display-settings
to 1beb4f649894d10f1418d987a9cbcfa36be8bf08 (commit)
from a8a6d181069b37f1f2d733134060b84b284a6056 (commit)
commit 1beb4f649894d10f1418d987a9cbcfa36be8bf08
Author: Lionel Le Folgoc <mrpouit at gmail.com>
Date: Sun Jun 6 18:33:05 2010 +0200
Really enforce the screen size
This needs to be done after all CRTCs have been updated, otherwise it will
silently fail if a CRTC has greater dimensions than the screen ones (this
happens when reducing the resolution…).
xfce4-settings-helper/displays.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/xfce4-settings-helper/displays.c b/xfce4-settings-helper/displays.c
index 6a3088b..4991ac6 100644
--- a/xfce4-settings-helper/displays.c
+++ b/xfce4-settings-helper/displays.c
@@ -353,12 +353,6 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper *helper,
/* get the sizes of the mode to enforce */
width += resources->modes[j].width;
height += resources->modes[j].height;
-
- /* set the screen size before applying the resolution, only if it's valid */
- if (width >= min_width && width <= max_width
- && height >= min_height && height <= max_height)
- XRRSetScreenSize (xdisplay, GDK_WINDOW_XID (root_window),
- width, height, mm_width, mm_height);
}
if (XRRSetCrtcConfig (xdisplay, resources, output_info->crtc,
@@ -389,6 +383,12 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper *helper,
g_free (output_name);
}
+ /* everything has been applied, set the screen size */
+ if (width >= min_width && width <= max_width
+ && height >= min_height && height <= max_height)
+ XRRSetScreenSize (xdisplay, GDK_WINDOW_XID (root_window),
+ width, height, mm_width, mm_height);
+
/* free the screen resources */
XRRFreeScreenResources (resources);
More information about the Xfce4-commits
mailing list