ecore-wayland: Fix issue with Elementary DnD test not releasing mouse
authorChris Michael <cp.michael@samsung.com>
Tue, 13 Jan 2015 16:37:02 +0000 (11:37 -0500)
committerChris Michael <cp.michael@samsung.com>
Tue, 13 Jan 2015 16:37:02 +0000 (11:37 -0500)
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 <cp.michael@samsung.com>
src/lib/ecore_wayland/ecore_wl_input.c

index e914d82..0bfc11e 100644 (file)
@@ -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);
 }