From c4b19a77b646fd7859b83bd7c680dc8263a10aba Mon Sep 17 00:00:00 2001 From: Derek Foreman Date: Thu, 5 Oct 2017 14:56:58 -0500 Subject: [PATCH] ecore_wl2: Fix setting empty opaque regions We should still update window->opaque when the opaque region is empty. --- src/lib/ecore_wl2/ecore_wl2_window.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index ebb7918..6ee4b39 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -711,13 +711,6 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w EINA_SAFETY_ON_NULL_RETURN(window); - if ((x == 0) && (y == 0) && (w == 0) && (h == 0)) - { - if (window->surface) - wl_surface_set_opaque_region(window->surface, NULL); - return; - } - switch (window->rotation) { case 0: @@ -756,10 +749,16 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w window->opaque.y = ny; window->opaque.w = nw; window->opaque.h = nh; - window->opaque_set = EINA_TRUE; + window->opaque_set = x || y || w || h; if (!window->surface) return; + if (!window->opaque_set) + { + wl_surface_set_opaque_region(window->surface, NULL); + return; + } + region = wl_compositor_create_region(window->display->wl.compositor); if (!region) { -- 2.7.4