Bool rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, CARD32 mmWidth, CARD32 mmHeight) { PixmapPtr screenPixmap; BoxRec box; ErrorF("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d\n", width, height, (int)mmWidth, (int)mmHeight); if ((width < 1) || (height < 1)) { ErrorF(" error width %d height %d\n", width, height); return FALSE; } g_rdpScreen.width = width; g_rdpScreen.height = height; g_rdpScreen.paddedWidthInBytes = PixmapBytePad(g_rdpScreen.width, g_rdpScreen.depth); g_rdpScreen.sizeInBytes = g_rdpScreen.paddedWidthInBytes * g_rdpScreen.height; pScreen->width = width; pScreen->height = height; pScreen->mmWidth = mmWidth; pScreen->mmHeight = mmHeight; screenPixmap = pScreen->GetScreenPixmap(pScreen); if (screenPixmap != 0) { ErrorF(" resizing screenPixmap [%p] to %dx%d, currently at %dx%d\n", (void *)screenPixmap, width, height, screenPixmap->drawable.width, screenPixmap->drawable.height); pScreen->ModifyPixmapHeader(screenPixmap, width, height, g_rdpScreen.depth, g_rdpScreen.bitsPerPixel, g_rdpScreen.paddedWidthInBytes, g_rdpScreen.pfbMemory); ErrorF(" pixmap resized to %dx%d\n", screenPixmap->drawable.width, screenPixmap->drawable.height); } DEBUG_OUT((" root window %p\n", (void *)pScreen->root)); box.x1 = 0; box.y1 = 0; box.x2 = width; box.y2 = height; RegionInit(&pScreen->root->winSize, &box, 1); RegionInit(&pScreen->root->borderSize, &box, 1); RegionReset(&pScreen->root->borderClip, &box); RegionBreak(&pScreen->root->clipList); pScreen->root->drawable.width = width; pScreen->root->drawable.height = height; ResizeChildrenWinSize(pScreen->root, 0, 0, 0, 0); RRGetInfo(pScreen, 1); rdpInvalidateArea(g_pScreen, 0, 0, g_rdpScreen.width, g_rdpScreen.height); ErrorF(" screen resized to %dx%d\n", pScreen->width, pScreen->height); return TRUE; }
static Bool KdCreateWindow(WindowPtr pWin) { #ifndef PHOENIX if (!pWin->parent) { KdScreenPriv(pWin->drawable.pScreen); if (!pScreenPriv->enabled) { RegionEmpty(&pWin->borderClip); RegionBreak(&pWin->clipList); } } #endif return fbCreateWindow(pWin); }