summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcos <cos>2018-07-15 12:51:18 +0200
committercos <cos>2018-07-15 12:54:07 +0200
commit04af61d8753ddd696a6ad52a16bf1f0305aba66b (patch)
tree00f75b6cc3d28f74df6347f20f485797ceb9d7af
parent74b2129e09ee753f952132d317afe5b503fec07e (diff)
downloadrdesktop-hax/reallocate_gbackstore.zip
Re-allocate g_backstore Pixmap to correct size in ui_set_clip()hax/reallocate_gbackstore
Details on https://github.com/rdesktop/rdesktop/issues/217
-rw-r--r--xwin.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/xwin.c b/xwin.c
index 278b664..b46acdc 100644
--- a/xwin.c
+++ b/xwin.c
@@ -3670,6 +3670,9 @@ ui_set_clip(int x, int y, int cx, int cy)
g_clip_rectangle.width = cx;
g_clip_rectangle.height = cy;
XSetClipRectangles(g_display, g_gc, 0, 0, &g_clip_rectangle, 1, YXBanded);
+ if ( g_backstore )
+ XFreePixmap(g_display, g_backstore);
+ g_backstore = XCreatePixmap(g_display, g_wnd, g_clip_rectangle.width, g_clip_rectangle.height, g_depth);
}
void