xorg driver, still working on randr

ulab-next
Jay Sorg 12 years ago
parent 961105ba95
commit bf9419c527

@ -97,25 +97,20 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
{ {
WindowPtr root; WindowPtr root;
PixmapPtr screenPixmap; PixmapPtr screenPixmap;
PixmapPtr rootWindowPixmap;
BoxRec box; BoxRec box;
ScrnInfoPtr pScrn; ScrnInfoPtr pScrn;
rdpPtr dev; rdpPtr dev;
char *oldpfbMemory;
LLOGLN(0, ("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d", LLOGLN(0, ("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d",
width, height, (int)mmWidth, (int)mmHeight)); width, height, (int)mmWidth, (int)mmHeight));
pScrn = xf86Screens[pScreen->myNum]; pScrn = xf86Screens[pScreen->myNum];
dev = XRDPPTR(pScrn); dev = XRDPPTR(pScrn);
root = rdpGetRootWindowPtr(pScreen); root = rdpGetRootWindowPtr(pScreen);
if ((width < 1) || (height < 1)) if ((width < 1) || (height < 1))
{ {
LLOGLN(10, (" error width %d height %d", width, height)); LLOGLN(10, (" error width %d height %d", width, height));
return FALSE; return FALSE;
} }
dev->width = width; dev->width = width;
dev->height = height; dev->height = height;
dev->paddedWidthInBytes = PixmapBytePad(dev->width, dev->depth); dev->paddedWidthInBytes = PixmapBytePad(dev->width, dev->depth);
@ -124,13 +119,9 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
pScreen->height = height; pScreen->height = height;
pScreen->mmWidth = mmWidth; pScreen->mmWidth = mmWidth;
pScreen->mmHeight = mmHeight; pScreen->mmHeight = mmHeight;
screenPixmap = pScreen->GetScreenPixmap(pScreen); screenPixmap = pScreen->GetScreenPixmap(pScreen);
rootWindowPixmap = pScreen->GetWindowPixmap(root); free(dev->pfbMemory);
oldpfbMemory = dev->pfbMemory;
dev->pfbMemory = (char *) malloc(dev->sizeInBytes); dev->pfbMemory = (char *) malloc(dev->sizeInBytes);
if (screenPixmap != 0) if (screenPixmap != 0)
{ {
pScreen->ModifyPixmapHeader(screenPixmap, width, height, pScreen->ModifyPixmapHeader(screenPixmap, width, height,
@ -138,17 +129,6 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
dev->paddedWidthInBytes, dev->paddedWidthInBytes,
dev->pfbMemory); dev->pfbMemory);
} }
if (rootWindowPixmap != 0)
{
pScreen->ModifyPixmapHeader(rootWindowPixmap, width, height,
-1, -1,
dev->paddedWidthInBytes,
dev->pfbMemory);
}
free(oldpfbMemory);
box.x1 = 0; box.x1 = 0;
box.y1 = 0; box.y1 = 0;
box.x2 = width; box.x2 = width;
@ -162,10 +142,8 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
ResizeChildrenWinSize(root, 0, 0, 0, 0); ResizeChildrenWinSize(root, 0, 0, 0, 0);
RRGetInfo(pScreen, 1); RRGetInfo(pScreen, 1);
LLOGLN(0, (" screen resized to %dx%d", pScreen->width, pScreen->height)); LLOGLN(0, (" screen resized to %dx%d", pScreen->width, pScreen->height));
xf86EnableDisableFBAccess(pScreen->myNum, 0); xf86EnableDisableFBAccess(pScreen->myNum, 0);
xf86EnableDisableFBAccess(pScreen->myNum, 1); xf86EnableDisableFBAccess(pScreen->myNum, 1);
return TRUE; return TRUE;
} }

Loading…
Cancel
Save