From 43e60f3f8376e601bbc8122ee0af0debc411e58f Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Thu, 25 Jul 2013 15:45:55 +0100 Subject: [PATCH] Check that we have both Rects and Count is > 0 during buffer attach. NB: When trying to attach a buffer to a surface, there was a corner case that could fail in that if we just had 'rects' but count was 0, then the surface would not get damaged (essentially a call to wl_surface_damage would get passed 0,0 as the size). This fixes that problem in that if count is <= 0 now, then we'll damage the whole surface. Signed-off-by: Chris Michael --- src/modules/evas/engines/wayland_shm/evas_swapper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/modules/evas/engines/wayland_shm/evas_swapper.c b/src/modules/evas/engines/wayland_shm/evas_swapper.c index ba1283c0cb..f9f5b3de21 100644 --- a/src/modules/evas/engines/wayland_shm/evas_swapper.c +++ b/src/modules/evas/engines/wayland_shm/evas_swapper.c @@ -469,10 +469,8 @@ _evas_swapper_buffer_put(Wl_Swapper *ws, Wl_Buffer *wb, Eina_Rectangle *rects, u return; } - if ((!rects) || (count == 0)) return; - rect = eina_rectangle_new(0, 0, 0, 0); - if (rects) + if ((rects) && (count > 0)) { unsigned int i = 0;