From 75f0fc7807bf400b4a4f30b15b921b08cec9f792 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 9 Jan 2015 16:00:03 -0800 Subject: [PATCH] GUAC-996: Do not reset clip upon resize. Fix copy of surface data. --- src/common/guac_surface.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/guac_surface.c b/src/common/guac_surface.c index a82867ec..123f400d 100644 --- a/src/common/guac_surface.c +++ b/src/common/guac_surface.c @@ -718,10 +718,10 @@ void guac_common_surface_resize(guac_common_surface* surface, int w, int h) { surface->height = h; surface->stride = cairo_format_stride_for_width(CAIRO_FORMAT_RGB24, w); surface->buffer = calloc(h, surface->stride); - guac_common_surface_reset_clip(surface); + __guac_common_bound_rect(surface, &surface->clip_rect, NULL, NULL); /* Copy relevant old data */ - guac_common_rect_constrain(&old_rect, &surface->clip_rect); + __guac_common_bound_rect(surface, &old_rect, NULL, NULL); __guac_common_surface_put(old_buffer, old_stride, &sx, &sy, surface, &old_rect, 1); /* Free old data */