diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-04-12 11:11:03 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2007-04-12 11:11:03 +0930 |
commit | d4dad6f84f82a4ade5005c3aa93511c1295875b8 (patch) | |
tree | 7a849db2957c762966a493a322e3608e3ef95b3d /randr | |
parent | f1f8b562aaaa6ec32ab0d0697f964d92d6d536a4 (diff) | |
parent | 33a5d9605e3e282f6aa1921d7321a2a12ef02c42 (diff) |
Merge branch 'master' into mpx
Conflicts:
configure.ac
dix/events.c
hw/xfree86/common/xf86Xinput.c
Diffstat (limited to 'randr')
-rw-r--r-- | randr/rrscreen.c | 31 |
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; |