summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2017-10-05 15:15:10 -0500
committerDerek Foreman <derekf@osg.samsung.com>2017-10-12 12:24:03 -0500
commit4985dee49d45fbe61c3ecb59c62491af521a1edd (patch)
tree76179c517e1b1772da008d3a52c8837f7525223a /src/lib/ecore_wl2
parentc4b19a77b646fd7859b83bd7c680dc8263a10aba (diff)
ecore_wl2: Fix setting empty input regions
We should still update window->input_rect when the input 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 6ee4b39a3e..3dde40c901 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -780,13 +780,6 @@ ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w,
780 780
781 EINA_SAFETY_ON_NULL_RETURN(window); 781 EINA_SAFETY_ON_NULL_RETURN(window);
782 782
783 if ((x == 0) && (y == 0) && (w == 0) && (h == 0))
784 {
785 if (window->surface)
786 wl_surface_set_input_region(window->surface, NULL);
787 return;
788 }
789
790 switch (window->rotation) 783 switch (window->rotation)
791 { 784 {
792 case 0: 785 case 0:
@@ -825,11 +818,17 @@ ecore_wl2_window_input_region_set(Ecore_Wl2_Window *window, int x, int y, int w,
825 window->input_rect.y = ny; 818 window->input_rect.y = ny;
826 window->input_rect.w = nw; 819 window->input_rect.w = nw;
827 window->input_rect.h = nh; 820 window->input_rect.h = nh;
828 window->input_set = EINA_TRUE; 821 window->input_set = x || y || w || h;
829 822
830 if (!window->surface) return; 823 if (!window->surface) return;
831 if (window->type == ECORE_WL2_WINDOW_TYPE_DND) return; 824 if (window->type == ECORE_WL2_WINDOW_TYPE_DND) return;
832 825
826 if (!window->input_set)
827 {
828 wl_surface_set_input_region(window->surface, NULL);
829 return;
830 }
831
833 region = wl_compositor_create_region(window->display->wl.compositor); 832 region = wl_compositor_create_region(window->display->wl.compositor);
834 if (!region) 833 if (!region)
835 { 834 {