aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2016-02-17 13:14:38 -0500
committerMike Blumenkrantz <zmike@osg.samsung.com>2016-02-17 13:16:04 -0500
commitf85504cd6c1d9090a04af14889954dfb7eda30d8 (patch)
treeb6f07b1282292d6f543b6308c75eae23d6f641bc /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-x: Add safety checks for NULL display in dpms functions (diff)
downloadefl-f85504cd6c1d9090a04af14889954dfb7eda30d8.tar.gz
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
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c13
1 files 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 9d0301a0d6..f3623258c1 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