summaryrefslogtreecommitdiffstats
path: root/xorg/X11R7.6/rdp/rdprandr.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg/X11R7.6/rdp/rdprandr.c')
-rw-r--r--xorg/X11R7.6/rdp/rdprandr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xorg/X11R7.6/rdp/rdprandr.c b/xorg/X11R7.6/rdp/rdprandr.c
index a767b1d8..8b3eb582 100644
--- a/xorg/X11R7.6/rdp/rdprandr.c
+++ b/xorg/X11R7.6/rdp/rdprandr.c
@@ -156,6 +156,13 @@ rdpRRScreenSetSize(ScreenPtr pScreen, CARD16 width, CARD16 height,
ErrorF(" resizing screenPixmap [%p] to %dx%d, currently at %dx%d\n",
(void *)screenPixmap, width, height,
screenPixmap->drawable.width, screenPixmap->drawable.height);
+ if (g_rdpScreen.sizeInBytes > g_rdpScreen.sizeInBytesAlloc)
+ {
+ g_free(g_rdpScreen.pfbMemory);
+ g_rdpScreen.pfbMemory = (char*)g_malloc(g_rdpScreen.sizeInBytes, 1);
+ g_rdpScreen.sizeInBytesAlloc = g_rdpScreen.sizeInBytes;
+ ErrorF("new buffer size %d\n", g_rdpScreen.sizeInBytes);
+ }
pScreen->ModifyPixmapHeader(screenPixmap, width, height,
g_rdpScreen.depth, g_rdpScreen.bitsPerPixel,
g_rdpScreen.paddedWidthInBytes,