discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f85504cd6c1d9090a04af14889954dfb7eda30d8

commit f85504cd6c1d9090a04af14889954dfb7eda30d8
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Wed Feb 17 13:14:38 2016 -0500

    ecore-wl2: do not send double mouse up events during input ungrab
    
    if the ungrab is triggered from a mouse up event, this ensures that a
    mouse up will be sent from the ungrab function. continuing to send a
    mouse up event in addition to this will guarantee multiple mouse events
    are emitted
    
    @fix
---
 src/lib/ecore_wl2/ecore_wl2_input.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c 
b/src/lib/ecore_wl2/ecore_wl2_input.c
index 9d0301a..f362325 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -573,12 +573,11 @@ _pointer_cb_button(void *data, struct wl_pointer *pointer 
EINA_UNUSED, unsigned
      }
    else
      {
-        if (input->focus.pointer)
-          _ecore_wl2_input_mouse_up_send(input, input->focus.pointer,
-                                         0, button, timestamp);
-
         if ((input->grab.window) && (input->grab.button == button))
           _ecore_wl2_input_ungrab(input);
+        else if (input->focus.pointer)
+          _ecore_wl2_input_mouse_up_send(input, input->focus.pointer,
+                                         0, button, timestamp);
      }
 }
 
@@ -953,11 +952,11 @@ _touch_cb_up(void *data, struct wl_touch *touch 
EINA_UNUSED, unsigned int serial
    input->timestamp = timestamp;
    input->display->serial = serial;
 
-   _ecore_wl2_input_mouse_up_send(input, input->focus.touch, id,
-                                  BTN_LEFT, timestamp);
-
    if ((input->grab.window) && (input->grab.button == BTN_LEFT))
      _ecore_wl2_input_ungrab(input);
+   else
+     _ecore_wl2_input_mouse_up_send(input, input->focus.touch, id,
+                                    BTN_LEFT, timestamp);
 }
 
 static void

-- 


Reply via email to