summaryrefslogtreecommitdiff
path: root/randr/rrscreen.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-10-13 17:34:53 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-10-13 17:34:53 -0700
commit054f8cd2675a80b14bc1ce266377fcfee2335cee (patch)
treee8ad75d1953b59bde6cece58bea61a4089c5e404 /randr/rrscreen.c
parent1178796a4dff5ebf0bd9fb3cacb35be9709b41e5 (diff)
Limit pointer to valid crtc areas. Add event swapping. Fix change tracking.
Add function to keep pointer within valid crtc areas. Finish event delivery and swapping code. Separate configuration from layout changes to send correct events.
Diffstat (limited to 'randr/rrscreen.c')
-rw-r--r--randr/rrscreen.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 7b53f0468..6d38e96b5 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -164,10 +164,13 @@ RRScreenSizeNotify (ScreenPtr pScreen)
pScrPriv->width = pScreen->width;
pScrPriv->height = pScreen->height;
pScrPriv->changed = TRUE;
+ pScrPriv->sizeChanged = TRUE;
+ RRTellChanged (pScreen);
RRSendConfigNotify (pScreen);
RREditConnectionInfo (pScreen);
+ RRPointerScreenConfigured (pScreen);
/*
* Fix pointer bounds and location
*/
@@ -836,9 +839,37 @@ ProcRRSetScreenConfig (ClientPtr client)
goto sendReply;
}
+ /*
+ * 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)
+ {
+ int c;
+
+ for (c = 0; c < pScrPriv->numCrtcs; c++)
+ {
+ rep.status = RRCrtcSet (pScrPriv->->crtc, NULL, 0, 0, RR_Rotate_0,
+ 0, NULL);
+ if (rep.status != Success)
+ goto sendReply;
+ }
+ if (!RRScreenSizeSet (pScreen, mode->mode.width, mode->mode.height,
+ pScreen->mmWidth, pScreen->mmHeight))
+ {
+ rep.status RRSetConfigFailed;
+ goto sendReply;
+ }
+ }
+
rep.status = RRCrtcSet (output.output->crtc, mode, 0, 0, stuff->rotation,
1, &output);
+ /*
+ * XXX Configure other crtcs to mirror as much as possible
+ */
+
sendReply:
if (pData)