From 6b1e62afa4a6f1b6f76425945315ff9043b1062e Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 13 Jan 2015 11:37:02 -0500 Subject: [PATCH] ecore-wayland: Fix issue with Elementary DnD test not releasing mouse Summary: When we do an input_ungrab, we should be sending a mouse up event so that apps/elm/etc know that the mouse has been released. This fixes an issue in the Elm Features DnD test report by Daniel Zaoui @fix Signed-off-by: Chris Michael --- src/lib/ecore_wayland/ecore_wl_input.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index e914d82..0bfc11e 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -161,6 +161,10 @@ ecore_wl_input_ungrab(Ecore_Wl_Input *input) LOGFN(__FILE__, __LINE__, __FUNCTION__); if (!input) return; + + _ecore_wl_input_mouse_up_send(input, input->grab, + 0, input->grab_button, input->grab_timestamp); + input->grab = NULL; input->grab_button = 0; } @@ -181,9 +185,6 @@ _ecore_wl_input_grab_release(Ecore_Wl_Input *input, Ecore_Wl_Window *win) if (!input) return; if (input->grab != win) return; - _ecore_wl_input_mouse_up_send(input, input->grab, - 0, input->grab_button, input->grab_timestamp); - ecore_wl_input_ungrab(input); } -- 2.7.4