aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2018-03-20 14:18:48 -0500
committerDerek Foreman <derekf@osg.samsung.com>2018-03-20 14:30:39 -0500
commit94ddefc6fb3da07676f63b7a9bf31987e85a1aa3 (patch)
tree43308b81a7838bfb668faad5e2332ba875a52bf5
parenteolian: make use of panics for certain alloc errors (diff)
downloadefl-94ddefc6fb3da07676f63b7a9bf31987e85a1aa3.tar.gz
ecore_wl2: Send a mouse-up event on reentry after client initiated resize
Apparently when we initiate a client side move in ecore_wl2 we flag that and send a mouse-up immediately on the next pointer enter. Do the same for resize. At some point this might need to be revisited, we should probably be sending a "cancel" at the start of client initiated move/resize instead of an up at the end? Fix https://phab.enlightenment.org/T6422
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c4
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_private.h1
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 3082c5af05..256dd45c15 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -717,11 +717,11 @@ _pointer_cb_enter(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
_ecore_wl2_input_mouse_in_send(input, window);
- if ((window->moving) && (input->grab.window == window))
+ if ((window->moving || window->resizing) && (input->grab.window == window))
{
_ecore_wl2_input_mouse_up_send(input, window, 0, input->grab.button,
input->grab.timestamp);
- window->moving = EINA_FALSE;
+ window->resizing = window->moving = EINA_FALSE;
}
}
diff --git a/src/lib/ecore_wl2/ecore_wl2_private.h b/src/lib/ecore_wl2/ecore_wl2_private.h
index 47590552b6..09fc0abc1c 100644
--- a/src/lib/ecore_wl2/ecore_wl2_private.h
+++ b/src/lib/ecore_wl2/ecore_wl2_private.h
@@ -231,6 +231,7 @@ struct _Ecore_Wl2_Window
Ecore_Wl2_Window_Configure_State def_config;
Eina_Bool moving : 1;
+ Eina_Bool resizing : 1;
Eina_Bool alpha : 1;
Eina_Bool transparent : 1;
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index c907f08ad0..43ab769f80 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -751,6 +751,8 @@ ecore_wl2_window_resize(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input, int lo
if (!input)
input = EINA_INLIST_CONTAINER_GET(window->display->inputs, Ecore_Wl2_Input);
+ window->resizing = EINA_TRUE;
+
if (window->xdg_toplevel)
xdg_toplevel_resize(window->xdg_toplevel, input->wl.seat,
window->display->serial, location);