diff options
author | Jim Grandy <jgrandy@authentic8.com> | 2013-07-03 09:08:14 -0700 |
---|---|---|
committer | Jim Grandy <jgrandy@authentic8.com> | 2013-08-22 12:49:40 -0700 |
commit | 984e12a54ee7fa663e68ca3ffbf08a28af829cfd (patch) | |
tree | 0065f27fc34f8622b3425a41eed7273f7e3d70bb /xorg/X11R7.6/rdp/rdprandr.c | |
parent | 81488cd6154a527f3cf7ebb1dcc568b0fbf57217 (diff) | |
download | xrdp-proprietary-984e12a54ee7fa663e68ca3ffbf08a28af829cfd.tar.gz xrdp-proprietary-984e12a54ee7fa663e68ca3ffbf08a28af829cfd.zip |
Hand-apply patches (X11rdp: fix for frame buffer getting smaller in randr) from Authentic8 branch: 1e92a08
Diffstat (limited to 'xorg/X11R7.6/rdp/rdprandr.c')
-rw-r--r-- | xorg/X11R7.6/rdp/rdprandr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xorg/X11R7.6/rdp/rdprandr.c b/xorg/X11R7.6/rdp/rdprandr.c index 26b56bfe..8b3eb582 100644 --- a/xorg/X11R7.6/rdp/rdprandr.c +++ b/xorg/X11R7.6/rdp/rdprandr.c @@ -156,8 +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); - g_free(g_rdpScreen.pfbMemory); - g_rdpScreen.pfbMemory = g_malloc(g_rdpScreen.sizeInBytes, 1); + 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, |