summaryrefslogtreecommitdiff
path: root/randr/rrscreen.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-06-18 16:51:13 -0700
committerIan Romanick <idr@us.ibm.com>2007-06-18 16:51:13 -0700
commitab7a6d860d4a275a810a64b1ba7b13726ed10575 (patch)
tree1198628dab08c3989dff073b4bbe6920a1feca59 /randr/rrscreen.c
parente9130b8bac73a0843d5ff6b2216eccfb3e094a48 (diff)
parent2e7fef7d0837939e822c40b6ac77e7f0e66d57bd (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/xserver into pci-rework
Conflicts: hw/xfree86/os-support/bus/Pci.c hw/xfree86/os-support/bus/linuxPci.c
Diffstat (limited to 'randr/rrscreen.c')
-rw-r--r--randr/rrscreen.c31
1 files changed, 23 insertions, 8 deletions
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index ad74ac3af..d92a0ffee 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -116,11 +116,19 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen)
se.sequenceNumber = client->sequence;
se.sizeID = RR10CurrentSizeID (pScreen);
-
- se.widthInPixels = pScreen->width;
- se.heightInPixels = pScreen->height;
- se.widthInMillimeters = pScreen->mmWidth;
- se.heightInMillimeters = pScreen->mmHeight;
+
+ if (se.rotation & (RR_Rotate_90 | RR_Rotate_270)) {
+ se.widthInPixels = pScreen->height;
+ se.heightInPixels = pScreen->width;
+ se.widthInMillimeters = pScreen->mmHeight;
+ se.heightInMillimeters = pScreen->mmWidth;
+ } else {
+ se.widthInPixels = pScreen->width;
+ se.heightInPixels = pScreen->height;
+ se.widthInMillimeters = pScreen->mmWidth;
+ se.heightInMillimeters = pScreen->mmHeight;
+ }
+
WriteEventsToClient (client, 1, (xEvent *) &se);
}
@@ -733,6 +741,7 @@ ProcRRSetScreenConfig (ClientPtr client)
RRModePtr mode;
RR10DataPtr pData = NULL;
RRScreenSizePtr pSize;
+ int width, height;
UpdateCurrentTime ();
@@ -875,8 +884,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;
@@ -890,7 +905,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;