diff options
Diffstat (limited to 'randr/rrscreen.c')
-rw-r--r-- | randr/rrscreen.c | 31 |
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) |