From a5ec24c17bc15bc56ce3d3e0d145ec610550cbd4 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sun, 28 Feb 2016 19:21:14 -0800 Subject: [PATCH] GUAC-236: Fix buffer resize (contents were being cleared). --- src/guacenc/buffer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/guacenc/buffer.c b/src/guacenc/buffer.c index f7387997..1a3481f9 100644 --- a/src/guacenc/buffer.c +++ b/src/guacenc/buffer.c @@ -100,8 +100,9 @@ int guacenc_buffer_resize(guacenc_buffer* buffer, int width, int height) { /* Copy old surface, if defined */ if (buffer->surface != NULL) { + cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); cairo_set_source_surface(cairo, buffer->surface, 0, 0); - cairo_rectangle(cairo, 0, 0, width, height); + cairo_set_operator(cairo, CAIRO_OPERATOR_OVER); cairo_paint(cairo); }