randr: Update initial screen size if panning information is present
This commit is contained in:
parent
24d6b7d1c5
commit
f8e52f1b6d
|
@ -561,10 +561,16 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
|
||||||
int crtc_width = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
|
int crtc_width = crtc->x + xf86ModeWidth (&crtc->mode, crtc->rotation);
|
||||||
int crtc_height = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
|
int crtc_height = crtc->y + xf86ModeHeight (&crtc->mode, crtc->rotation);
|
||||||
|
|
||||||
if (crtc->enabled && crtc_width > width)
|
if (crtc->enabled) {
|
||||||
width = crtc_width;
|
if (crtc_width > width)
|
||||||
if (crtc->enabled && crtc_height > height)
|
width = crtc_width;
|
||||||
height = crtc_height;
|
if (crtc_height > height)
|
||||||
|
height = crtc_height;
|
||||||
|
if (crtc->panningTotalArea.x2 > width)
|
||||||
|
width = crtc->panningTotalArea.x2;
|
||||||
|
if (crtc->panningTotalArea.y2 > height)
|
||||||
|
height = crtc->panningTotalArea.y2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (width && height)
|
if (width && height)
|
||||||
|
@ -615,6 +621,13 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
|
||||||
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
|
||||||
"Setting screen physical size to %d x %d\n",
|
"Setting screen physical size to %d x %d\n",
|
||||||
mmWidth, mmHeight);
|
mmWidth, mmHeight);
|
||||||
|
/*
|
||||||
|
* This is the initial setting of the screen size.
|
||||||
|
* We have to pre-set it here, otherwise panning would be adapted
|
||||||
|
* to the new screen size.
|
||||||
|
*/
|
||||||
|
pScreen->width = width;
|
||||||
|
pScreen->height = height;
|
||||||
xf86RandR12ScreenSetSize (pScreen,
|
xf86RandR12ScreenSetSize (pScreen,
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
|
|
Loading…
Reference in New Issue