Revert "Separate out screen size and screen pixmap sizes in RRScreenSizeSet"
This reverts commit 752c368421
.
This commit is contained in:
parent
4d91e7a631
commit
fd9331f6eb
|
@ -1038,12 +1038,7 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable)
|
||||||
RegionInit(&pWin->winSize, &box, 1);
|
RegionInit(&pWin->winSize, &box, 1);
|
||||||
RegionInit(&pWin->borderSize, &box, 1);
|
RegionInit(&pWin->borderSize, &box, 1);
|
||||||
if (WasViewable)
|
if (WasViewable)
|
||||||
{
|
|
||||||
PixmapPtr pPixmap = (*pScreen->GetScreenPixmap) (pScreen);
|
|
||||||
box.x2 = pPixmap->drawable.width;
|
|
||||||
box.y2 = pPixmap->drawable.height;
|
|
||||||
RegionReset(&pWin->borderClip, &box);
|
RegionReset(&pWin->borderClip, &box);
|
||||||
}
|
|
||||||
pWin->drawable.width = pScreen->width;
|
pWin->drawable.width = pScreen->width;
|
||||||
pWin->drawable.height = pScreen->height;
|
pWin->drawable.height = pScreen->height;
|
||||||
RegionBreak(&pWin->clipList);
|
RegionBreak(&pWin->clipList);
|
||||||
|
@ -1121,6 +1116,7 @@ xf86EnableDisableFBAccess(int scrnIndex, Bool enable)
|
||||||
*/
|
*/
|
||||||
if (!xf86Resetting)
|
if (!xf86Resetting)
|
||||||
xf86SetRootClip (pScreen, TRUE);
|
xf86SetRootClip (pScreen, TRUE);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -659,12 +659,10 @@ xf86RandR12SetConfig (ScreenPtr pScreen,
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height,
|
CARD16 height,
|
||||||
CARD16 pixWidth,
|
CARD32 mmWidth,
|
||||||
CARD16 pixHeight,
|
CARD32 mmHeight)
|
||||||
CARD32 mmWidth,
|
|
||||||
CARD32 mmHeight)
|
|
||||||
{
|
{
|
||||||
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen);
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
@ -672,8 +670,6 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
||||||
WindowPtr pRoot = pScreen->root;
|
WindowPtr pRoot = pScreen->root;
|
||||||
PixmapPtr pScrnPix;
|
PixmapPtr pScrnPix;
|
||||||
Bool ret = FALSE;
|
Bool ret = FALSE;
|
||||||
Bool pixSizeChanged = FALSE;
|
|
||||||
Bool winSizeChanged = FALSE;
|
|
||||||
int c;
|
int c;
|
||||||
|
|
||||||
if (xf86RandR12Key) {
|
if (xf86RandR12Key) {
|
||||||
|
@ -681,85 +677,46 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen,
|
||||||
{
|
{
|
||||||
randrp->virtualX = pScrn->virtualX;
|
randrp->virtualX = pScrn->virtualX;
|
||||||
randrp->virtualY = pScrn->virtualY;
|
randrp->virtualY = pScrn->virtualY;
|
||||||
pixSizeChanged = TRUE;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (pRoot && pScrn->vtSema)
|
||||||
|
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
|
||||||
|
|
||||||
pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
/* Let the driver update virtualX and virtualY */
|
||||||
if (pixWidth != pScrnPix->drawable.width ||
|
if (!(*config->funcs->resize)(pScrn, width, height))
|
||||||
pixHeight != pScrnPix->drawable.height)
|
goto finish;
|
||||||
pixSizeChanged = TRUE;
|
|
||||||
|
|
||||||
if (width != pScreen->width || height != pScreen->height)
|
|
||||||
winSizeChanged = TRUE;
|
|
||||||
|
|
||||||
if (pixSizeChanged)
|
|
||||||
{
|
|
||||||
if (pRoot && pScrn->vtSema)
|
|
||||||
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, FALSE);
|
|
||||||
|
|
||||||
/* Let the driver update virtualX and virtualY */
|
|
||||||
if (!(*config->funcs->resize)(pScrn, pixWidth, pixHeight))
|
|
||||||
goto finish;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
|
/* Update panning information */
|
||||||
if (winSizeChanged)
|
for (c = 0; c < config->num_crtc; c++) {
|
||||||
{
|
xf86CrtcPtr crtc = config->crtc[c];
|
||||||
/* Update panning information */
|
if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 ||
|
||||||
for (c = 0; c < config->num_crtc; c++) {
|
crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
|
||||||
xf86CrtcPtr crtc = config->crtc[c];
|
if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1)
|
||||||
if (crtc->panningTotalArea.x2 > crtc->panningTotalArea.x1 ||
|
crtc->panningTotalArea.x2 += width - pScreen->width;
|
||||||
crtc->panningTotalArea.y2 > crtc->panningTotalArea.y1) {
|
if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1)
|
||||||
if (crtc->panningTotalArea.x2 > crtc->panningTrackingArea.x1)
|
crtc->panningTotalArea.y2 += height - pScreen->height;
|
||||||
crtc->panningTotalArea.x2 += width - pScreen->width;
|
if (crtc->panningTrackingArea.x2 > crtc->panningTrackingArea.x1)
|
||||||
if (crtc->panningTotalArea.y2 > crtc->panningTrackingArea.y1)
|
crtc->panningTrackingArea.x2 += width - pScreen->width;
|
||||||
crtc->panningTotalArea.y2 += height - pScreen->height;
|
if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
|
||||||
if (crtc->panningTrackingArea.x2 > crtc->panningTrackingArea.x1)
|
crtc->panningTrackingArea.y2 += height - pScreen->height;
|
||||||
crtc->panningTrackingArea.x2 += width - pScreen->width;
|
xf86RandR13VerifyPanningArea (crtc, width, height);
|
||||||
if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
|
xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
|
||||||
crtc->panningTrackingArea.y2 += height - pScreen->height;
|
|
||||||
xf86RandR13VerifyPanningArea (crtc, width, height);
|
|
||||||
xf86RandR13Pan (crtc, randrp->pointerX, randrp->pointerY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
pScrnPix = (*pScreen->GetScreenPixmap)(pScreen);
|
||||||
pScreen->width = width;
|
pScreen->width = pScrnPix->drawable.width = width;
|
||||||
pScreen->height = height;
|
pScreen->height = pScrnPix->drawable.height = height;
|
||||||
if (pRoot)
|
|
||||||
{
|
|
||||||
BoxRec box;
|
|
||||||
|
|
||||||
pRoot->drawable.width = width;
|
|
||||||
pRoot->drawable.height = height;
|
|
||||||
box.x1 = 0;
|
|
||||||
box.y1 = 0;
|
|
||||||
box.x2 = width;
|
|
||||||
box.y2 = height;
|
|
||||||
RegionInit(&pRoot->winSize, &box, 1);
|
|
||||||
RegionInit(&pRoot->borderSize, &box, 1);
|
|
||||||
}
|
|
||||||
pScrnPix->drawable.width = pixWidth;
|
|
||||||
pScrnPix->drawable.height = pixHeight;
|
|
||||||
randrp->mmWidth = pScreen->mmWidth = mmWidth;
|
randrp->mmWidth = pScreen->mmWidth = mmWidth;
|
||||||
randrp->mmHeight = pScreen->mmHeight = mmHeight;
|
randrp->mmHeight = pScreen->mmHeight = mmHeight;
|
||||||
|
|
||||||
if (winSizeChanged)
|
xf86SetViewport (pScreen, pScreen->width-1, pScreen->height-1);
|
||||||
{
|
xf86SetViewport (pScreen, 0, 0);
|
||||||
xf86SetViewport (pScreen, pScreen->width-1, pScreen->height-1);
|
|
||||||
xf86SetViewport (pScreen, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
finish:
|
finish:
|
||||||
if (pixSizeChanged)
|
if (pRoot && pScrn->vtSema)
|
||||||
{
|
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
||||||
if (pRoot && pScrn->vtSema)
|
|
||||||
(*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
#if RANDR_12_INTERFACE
|
#if RANDR_12_INTERFACE
|
||||||
if (xf86RandR12Key && pScreen->root && ret)
|
if (xf86RandR12Key && pScreen->root && ret)
|
||||||
RRScreenSizeNotify (pScreen);
|
RRScreenSizeNotify (pScreen);
|
||||||
|
@ -859,8 +816,6 @@ xf86RandR12CreateScreenResources (ScreenPtr pScreen)
|
||||||
pScreen->width = width;
|
pScreen->width = width;
|
||||||
pScreen->height = height;
|
pScreen->height = height;
|
||||||
xf86RandR12ScreenSetSize (pScreen,
|
xf86RandR12ScreenSetSize (pScreen,
|
||||||
width,
|
|
||||||
height,
|
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
mmWidth,
|
mmWidth,
|
||||||
|
|
|
@ -28,6 +28,11 @@ miRRSetScreenConfig(ScreenPtr screen,
|
||||||
{
|
{
|
||||||
RRScreenConfigRec old_screen_config;
|
RRScreenConfigRec old_screen_config;
|
||||||
|
|
||||||
|
/* XXX deal with separate pixmap/screen sizes */
|
||||||
|
if (screen_config->screen_pixmap_width != screen_config->screen_width ||
|
||||||
|
screen_config->screen_pixmap_height != screen_config->screen_height)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
RRScreenCurrentConfig(screen, &old_screen_config);
|
RRScreenCurrentConfig(screen, &old_screen_config);
|
||||||
|
|
||||||
/* Check and see if nothing has changed */
|
/* Check and see if nothing has changed */
|
||||||
|
@ -42,8 +47,6 @@ miRRSetScreenConfig(ScreenPtr screen,
|
||||||
return RRScreenSizeSet(screen,
|
return RRScreenSizeSet(screen,
|
||||||
screen_config->screen_width,
|
screen_config->screen_width,
|
||||||
screen_config->screen_height,
|
screen_config->screen_height,
|
||||||
screen_config->screen_pixmap_width,
|
|
||||||
screen_config->screen_pixmap_height,
|
|
||||||
screen_config->mm_width,
|
screen_config->mm_width,
|
||||||
screen_config->mm_height);
|
screen_config->mm_height);
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,8 +191,6 @@ struct _rrOutput {
|
||||||
typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
|
typedef Bool (*RRScreenSetSizeProcPtr) (ScreenPtr pScreen,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height,
|
CARD16 height,
|
||||||
CARD16 pixWidth,
|
|
||||||
CARD16 pixHeight,
|
|
||||||
CARD32 mmWidth,
|
CARD32 mmWidth,
|
||||||
CARD32 mmHeight);
|
CARD32 mmHeight);
|
||||||
|
|
||||||
|
@ -480,8 +478,6 @@ extern _X_EXPORT Bool
|
||||||
RRScreenSizeSet (ScreenPtr pScreen,
|
RRScreenSizeSet (ScreenPtr pScreen,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height,
|
CARD16 height,
|
||||||
CARD16 pixWidth,
|
|
||||||
CARD16 pixHeight,
|
|
||||||
CARD32 mmWidth,
|
CARD32 mmWidth,
|
||||||
CARD32 mmHeight);
|
CARD32 mmHeight);
|
||||||
|
|
||||||
|
|
|
@ -435,9 +435,10 @@ RRCrtcCurrentConfig(RRCrtcPtr crtc,
|
||||||
crtc_config->sprite_position_f_transform = crtc->client_sprite_f_position_transform;
|
crtc_config->sprite_position_f_transform = crtc->client_sprite_f_position_transform;
|
||||||
crtc_config->sprite_image_f_transform = crtc->client_sprite_f_image_transform;
|
crtc_config->sprite_image_f_transform = crtc->client_sprite_f_image_transform;
|
||||||
|
|
||||||
crtc_config->pixmap = crtc->scanoutPixmap;
|
/* XXX add pixmap stuff */
|
||||||
crtc_config->pixmap_x = crtc->x;
|
crtc_config->pixmap = NULL;
|
||||||
crtc_config->pixmap_y = crtc->y;
|
crtc_config->pixmap_x = 0;
|
||||||
|
crtc_config->pixmap_y = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1509,8 +1510,6 @@ RRConvertCrtcConfig(ClientPtr client, ScreenPtr screen,
|
||||||
|
|
||||||
if (x->pixmap == None)
|
if (x->pixmap == None)
|
||||||
pixmap = NULL;
|
pixmap = NULL;
|
||||||
else if (x->pixmap == RR_CurrentScanoutPixmap)
|
|
||||||
pixmap = crtc->scanoutPixmap;
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rc = dixLookupResourceByType((pointer *) &pixmap, x->pixmap,
|
rc = dixLookupResourceByType((pointer *) &pixmap, x->pixmap,
|
||||||
|
|
|
@ -168,8 +168,6 @@ Bool
|
||||||
RRScreenSizeSet (ScreenPtr pScreen,
|
RRScreenSizeSet (ScreenPtr pScreen,
|
||||||
CARD16 width,
|
CARD16 width,
|
||||||
CARD16 height,
|
CARD16 height,
|
||||||
CARD16 pixWidth,
|
|
||||||
CARD16 pixHeight,
|
|
||||||
CARD32 mmWidth,
|
CARD32 mmWidth,
|
||||||
CARD32 mmHeight)
|
CARD32 mmHeight)
|
||||||
{
|
{
|
||||||
|
@ -180,7 +178,6 @@ RRScreenSizeSet (ScreenPtr pScreen,
|
||||||
{
|
{
|
||||||
return (*pScrPriv->rrScreenSetSize) (pScreen,
|
return (*pScrPriv->rrScreenSetSize) (pScreen,
|
||||||
width, height,
|
width, height,
|
||||||
pixWidth, pixHeight,
|
|
||||||
mmWidth, mmHeight);
|
mmWidth, mmHeight);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -320,7 +317,6 @@ ProcRRSetScreenSize (ClientPtr client)
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
if (!RRScreenSizeSet (pScreen,
|
if (!RRScreenSizeSet (pScreen,
|
||||||
stuff->width, stuff->height,
|
|
||||||
stuff->width, stuff->height,
|
stuff->width, stuff->height,
|
||||||
stuff->widthInMillimeters,
|
stuff->widthInMillimeters,
|
||||||
stuff->heightInMillimeters))
|
stuff->heightInMillimeters))
|
||||||
|
@ -965,7 +961,7 @@ ProcRRSetScreenConfig (ClientPtr client)
|
||||||
goto sendReply;
|
goto sendReply;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!RRScreenSizeSet (pScreen, width, height, width, height,
|
if (!RRScreenSizeSet (pScreen, width, height,
|
||||||
pScreen->mmWidth, pScreen->mmHeight))
|
pScreen->mmWidth, pScreen->mmHeight))
|
||||||
{
|
{
|
||||||
rep.status = RRSetConfigFailed;
|
rep.status = RRSetConfigFailed;
|
||||||
|
|
Loading…
Reference in New Issue