diff options
author | Jay Sorg <jay.sorg@gmail.com> | 2013-07-17 23:40:01 -0700 |
---|---|---|
committer | Jay Sorg <jay.sorg@gmail.com> | 2013-07-17 23:40:01 -0700 |
commit | 961105ba95a89b6e97e75d7c18f6e58a8d07e28f (patch) | |
tree | 6871b8344ce3afdcc74286e111b9d187a35fd39a /xorg/server/module/rdpRandR.c | |
parent | 2ad9b26c21dda68228e8ecd777375656de77dcc5 (diff) | |
download | xrdp-proprietary-961105ba95a89b6e97e75d7c18f6e58a8d07e28f.tar.gz xrdp-proprietary-961105ba95a89b6e97e75d7c18f6e58a8d07e28f.zip |
xorg driver, randr working now
Diffstat (limited to 'xorg/server/module/rdpRandR.c')
-rw-r--r-- | xorg/server/module/rdpRandR.c | 32 |
1 files changed, 22 insertions, 10 deletions
diff --git a/xorg/server/module/rdpRandR.c b/xorg/server/module/rdpRandR.c index bcd01928..8ad4989b 100644 --- a/xorg/server/module/rdpRandR.c +++ b/xorg/server/module/rdpRandR.c @@ -97,12 +97,15 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, { WindowPtr root; PixmapPtr screenPixmap; + PixmapPtr rootWindowPixmap; BoxRec box; ScrnInfoPtr pScrn; rdpPtr dev; + char *oldpfbMemory; LLOGLN(0, ("rdpRRScreenSetSize: width %d height %d mmWidth %d mmHeight %d", width, height, (int)mmWidth, (int)mmHeight)); + pScrn = xf86Screens[pScreen->myNum]; dev = XRDPPTR(pScrn); root = rdpGetRootWindowPtr(pScreen); @@ -123,23 +126,29 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, pScreen->mmHeight = mmHeight; screenPixmap = pScreen->GetScreenPixmap(pScreen); + rootWindowPixmap = pScreen->GetWindowPixmap(root); + + oldpfbMemory = dev->pfbMemory; + dev->pfbMemory = (char *) malloc(dev->sizeInBytes); if (screenPixmap != 0) { - LLOGLN(0, (" resizing screenPixmap [%p] to %dx%d, " - "currently at %dx%d", (void *)screenPixmap, width, height, - screenPixmap->drawable.width, screenPixmap->drawable.height)); - free(dev->pfbMemory); - dev->pfbMemory = (char *) malloc(dev->sizeInBytes); pScreen->ModifyPixmapHeader(screenPixmap, width, height, - dev->depth, dev->bitsPerPixel, + -1, -1, + dev->paddedWidthInBytes, + dev->pfbMemory); + } + + if (rootWindowPixmap != 0) + { + pScreen->ModifyPixmapHeader(rootWindowPixmap, width, height, + -1, -1, dev->paddedWidthInBytes, dev->pfbMemory); - LLOGLN(0, (" pixmap resized to %dx%d", - screenPixmap->drawable.width, screenPixmap->drawable.height)); } - LLOGLN(10, (" root window %p", (void *)root)); + free(oldpfbMemory); + box.x1 = 0; box.y1 = 0; box.x2 = width; @@ -152,8 +161,11 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height, root->drawable.height = height; ResizeChildrenWinSize(root, 0, 0, 0, 0); RRGetInfo(pScreen, 1); - //rdpInvalidateArea(g_pScreen, 0, 0, dev->width, dev->height); LLOGLN(0, (" screen resized to %dx%d", pScreen->width, pScreen->height)); + + xf86EnableDisableFBAccess(pScreen->myNum, 0); + xf86EnableDisableFBAccess(pScreen->myNum, 1); + return TRUE; } |