summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-10-05 14:56:58 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-10-12 12:24:03 -0500
commitc4b19a77b646fd7859b83bd7c680dc8263a10aba (patch)
treed3908657953b50cb3a0c3316a41b8bc28c394801 /src/lib/ecore_wl2
parent64b36c67671df2c3116c0c6faa6d20c0e41d3bd1 (diff)
ecore_wl2: Fix setting empty opaque regions
We should still update window->opaque when the opaque region is empty.
Diffstat (limited to 'src/lib/ecore_wl2')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c15
1 files 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 ebb79182aa..6ee4b39a3e 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
711 711
712 EINA_SAFETY_ON_NULL_RETURN(window); 712 EINA_SAFETY_ON_NULL_RETURN(window);
713 713
714 if ((x == 0) && (y == 0) && (w == 0) && (h == 0))
715 {
716 if (window->surface)
717 wl_surface_set_opaque_region(window->surface, NULL);
718 return;
719 }
720
721 switch (window->rotation) 714 switch (window->rotation)
722 { 715 {
723 case 0: 716 case 0:
@@ -756,10 +749,16 @@ ecore_wl2_window_opaque_region_set(Ecore_Wl2_Window *window, int x, int y, int w
756 window->opaque.y = ny; 749 window->opaque.y = ny;
757 window->opaque.w = nw; 750 window->opaque.w = nw;
758 window->opaque.h = nh; 751 window->opaque.h = nh;
759 window->opaque_set = EINA_TRUE; 752 window->opaque_set = x || y || w || h;
760 753
761 if (!window->surface) return; 754 if (!window->surface) return;
762 755
756 if (!window->opaque_set)
757 {
758 wl_surface_set_opaque_region(window->surface, NULL);
759 return;
760 }
761
763 region = wl_compositor_create_region(window->display->wl.compositor); 762 region = wl_compositor_create_region(window->display->wl.compositor);
764 if (!region) 763 if (!region)
765 { 764 {