xserver: Branch 'master'

Aaron Plattner aplattner at kemper.freedesktop.org
Fri Jul 21 15:38:36 PDT 2006


 hw/xfree86/common/xf86RandR.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

New commits:
diff-tree eeaad0e956640aac653d194a992df7792e4abcbb (from 22db3fdb54d2f7f6b72638b46c186af6db04e214)
Author: Aaron Plattner <aplattner at nvidia.com>
Date:   Thu Jul 20 18:19:07 2006 -0700

    Fix the RandR failure path for rotated screens.

diff --git a/hw/xfree86/common/xf86RandR.c b/hw/xfree86/common/xf86RandR.c
index b06bd77..56496ab 100644
--- a/hw/xfree86/common/xf86RandR.c
+++ b/hw/xfree86/common/xf86RandR.c
@@ -156,6 +156,8 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
     int			oldHeight = pScreen->height;
     int			oldmmWidth = pScreen->mmWidth;
     int			oldmmHeight = pScreen->mmHeight;
+    int			oldVirtualX = scrp->virtualX;
+    int			oldVirtualY = scrp->virtualY;
     WindowPtr		pRoot = WindowTable[pScreen->myNum];
     Bool		ret = TRUE;
 
@@ -188,10 +190,12 @@ xf86RandRSetMode (ScreenPtr	    pScreen,
     }
     if (!xf86SwitchMode (pScreen, mode))
     {
-	scrp->virtualX = pScreen->width = oldWidth;
-	scrp->virtualY = pScreen->height = oldHeight;
+	pScreen->width = oldWidth;
+	pScreen->height = oldHeight;
 	pScreen->mmWidth = oldmmWidth;
 	pScreen->mmHeight = oldmmHeight;
+	scrp->virtualX = oldVirtualX;
+	scrp->virtualY = oldVirtualY;
 	ret = FALSE;
     }
     /*
@@ -270,8 +274,8 @@ xf86RandRSetConfig (ScreenPtr		pScreen,
 	       xorgRRRotation RRRotation;
 	       RRRotation.RRConfig.rotation = oldRotation;
 	       RRRotation.RRConfig.rate = xf86RandRModeRefresh (scrp->currentMode);
-	       RRRotation.RRConfig.width = pScreen->width;
-	       RRRotation.RRConfig.height = pScreen->height;
+	       RRRotation.RRConfig.width = scrp->virtualX;
+	       RRRotation.RRConfig.height = scrp->virtualY;
 	       (*scrp->DriverFunc)(scrp, RR_SET_CONFIG, &RRRotation);
 	   }
 



More information about the xorg-commit mailing list