diff options
-rw-r--r-- | hw/xwin/winrandr.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/hw/xwin/winrandr.c b/hw/xwin/winrandr.c index 1c1047a45..1bd97f963 100644 --- a/hw/xwin/winrandr.c +++ b/hw/xwin/winrandr.c @@ -42,17 +42,17 @@ static Bool winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations) { - rrScrPrivPtr pRRScrPriv; - RROutputPtr output; - - pRRScrPriv = rrGetScrPriv(pScreen); - output = pRRScrPriv->outputs[0]; - winDebug("winRandRGetInfo ()\n"); /* Don't support rotations */ *pRotations = RR_Rotate_0; + return TRUE; +} + +static void +winRandRUpdateMode(ScreenPtr pScreen, RROutputPtr output) +{ /* Delete previous mode */ if (output->modes[0]) { @@ -83,8 +83,6 @@ winRandRGetInfo(ScreenPtr pScreen, Rotation * pRotations) mode = RRModeGet(&modeInfo, name); output->crtc->mode = mode; } - - return TRUE; } /* @@ -95,6 +93,7 @@ winDoRandRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { + rrScrPrivPtr pRRScrPriv; winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; WindowPtr pRoot = pScreen->root; @@ -136,6 +135,10 @@ winDoRandRScreenSetSize(ScreenPtr pScreen, // and arrange for it to be repainted pScreen->PaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); + // Set mode to current display size + pRRScrPriv = rrGetScrPriv(pScreen); + winRandRUpdateMode(pScreen, pRRScrPriv->primaryOutput); + /* Indicate that a screen size change took place */ RRScreenSizeNotify(pScreen); } @@ -272,6 +275,9 @@ winRandRInit(ScreenPtr pScreen) /* Ensure we have space for exactly one mode */ output->modes = malloc(sizeof(RRModePtr)); output->modes[0] = NULL; + + /* Set mode to current display size */ + winRandRUpdateMode(pScreen, output); } /* |