<xfce4-settings:master> If the output is rotated (90 or 270°), switch height and width

Nick Schermer noreply at xfce.org
Sat Aug 28 23:02:26 CEST 2010


Updating branch refs/heads/master
         to 29597d9f5f11854507ba59c29cea6bd29bf6a419 (commit)
       from 47ccd9d3d6f0c69b977991c48ac6e7bbc5e50655 (commit)

commit 29597d9f5f11854507ba59c29cea6bd29bf6a419
Author: Lionel Le Folgoc <mrpouit at gmail.com>
Date:   Tue Jun 8 22:13:30 2010 +0200

    If the output is rotated (90 or 270°), switch height and width

 xfce4-settings-helper/displays.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/xfce4-settings-helper/displays.c b/xfce4-settings-helper/displays.c
index 4c00d51..91777b6 100644
--- a/xfce4-settings-helper/displays.c
+++ b/xfce4-settings-helper/displays.c
@@ -357,8 +357,16 @@ xfce_displays_helper_channel_apply (XfceDisplaysHelper *helper,
                     mm_height += output_info->mm_height;
 
                     /* get the sizes of the mode to enforce */
-                    width += resources->modes[j].width;
-                    height += resources->modes[j].height;
+                    if (rot == RR_Rotate_0 || rot == RR_Rotate_180)
+                    {
+                        width += resources->modes[j].width;
+                        height += resources->modes[j].height;
+                    }
+                    else
+                    {
+                        height += resources->modes[j].width;
+                        width += resources->modes[j].height;
+                    }
 
                     if (XRRSetCrtcConfig (xdisplay, resources, output_info->crtc,
                                           crtc_info->timestamp, crtc_info->x, crtc_info->y,



More information about the Xfce4-commits mailing list