[Xfce4-commits] <xfce4-settings:master> Really enforce the screen size
Nick Schermer
noreply at xfce.org
Sat Aug 28 23:02:23 CEST 2010
Updating branch refs/heads/master
to b2cb73d660d8586d3af4f70a5c7bb8d2b804771f (commit)
from f44c1f46dd9f66e05da10e893ba9fb1ec1cd95f8 (commit)
commit b2cb73d660d8586d3af4f70a5c7bb8d2b804771f
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