xserver: Branch 'server-1.3-branch'
Keith Packard
keithp at kemper.freedesktop.org
Tue Apr 10 00:29:55 EEST 2007
randr/rrscreen.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
New commits:
diff-tree efcec7dbd3c2736c7b421d29c4d37e231aa681d2 (from dc6c4f6989f87149d8605604f4514f5cbf11de67)
Author: Keith Packard <keithp at neko.keithp.com>
Date: Mon Apr 9 14:29:46 2007 -0700
Rotate screen size as needed from RandR 1.1 change requests.
Screen size must reflect rotated mode size when setting rotated mode using
RandR 1.1 SetScreenConfig request.
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 8aa26fa..f2981b0 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -741,6 +741,7 @@ ProcRRSetScreenConfig (ClientPtr client)
RRModePtr mode;
RR10DataPtr pData = NULL;
RRScreenSizePtr pSize;
+ int width, height;
UpdateCurrentTime ();
@@ -882,8 +883,14 @@ ProcRRSetScreenConfig (ClientPtr client)
* If the screen size is changing, adjust all of the other outputs
* to fit the new size, mirroring as much as possible
*/
- if (mode->mode.width != pScreen->width ||
- mode->mode.height != pScreen->height)
+ width = mode->mode.width;
+ height = mode->mode.height;
+ if (rotation & (RR_Rotate_90|RR_Rotate_270))
+ {
+ width = mode->mode.height;
+ height = mode->mode.width;
+ }
+ if (width != pScreen->width || height != pScreen->height)
{
int c;
@@ -897,7 +904,7 @@ ProcRRSetScreenConfig (ClientPtr client)
goto sendReply;
}
}
- if (!RRScreenSizeSet (pScreen, mode->mode.width, mode->mode.height,
+ if (!RRScreenSizeSet (pScreen, width, height,
pScreen->mmWidth, pScreen->mmHeight))
{
rep.status = RRSetConfigFailed;
More information about the xorg-commit
mailing list