summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-01-27 11:23:13 -0500
committerChristopher Michael <cp.michael@samsung.com>2020-01-27 11:23:13 -0500
commit7adcaedc081db2fd8c039b3e1416654d30b8b476 (patch)
treeb5b461a3927959e784824ab35d4e2d84e0ae1043
parent1b37f1504fe47ecd1c7f8736293c29afc01cd8aa (diff)
ecore_wl2: only ungrab/grab on last/first down/up event
Summary: otherwise we are silently forgetting about up events. Reviewers: zmike, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11199
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 75a7366f82..0e0e3ce0b7 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -1218,7 +1218,7 @@ _touch_cb_down(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int seri
1218 1218
1219 _pointer_cb_enter(data, NULL, serial, surface, x, y); 1219 _pointer_cb_enter(data, NULL, serial, surface, x, y);
1220 1220
1221 if ((!input->grab.window) && (input->focus.touch)) 1221 if ((!input->grab.window) && (input->focus.touch) && input->grab.touch_count == 1)
1222 { 1222 {
1223 _ecore_wl2_input_grab(input, input->focus.touch, BTN_LEFT); 1223 _ecore_wl2_input_grab(input, input->focus.touch, BTN_LEFT);
1224 input->grab.timestamp = timestamp; 1224 input->grab.timestamp = timestamp;
@@ -1246,7 +1246,7 @@ _touch_cb_up(void *data, struct wl_touch *touch EINA_UNUSED, unsigned int serial
1246 if (input->grab.count) input->grab.count--; 1246 if (input->grab.count) input->grab.count--;
1247 if (input->grab.touch_count) input->grab.touch_count--; 1247 if (input->grab.touch_count) input->grab.touch_count--;
1248 if ((input->grab.window) && (input->grab.button == BTN_LEFT) && 1248 if ((input->grab.window) && (input->grab.button == BTN_LEFT) &&
1249 (!input->grab.count)) 1249 (!input->grab.count) && !input->grab.touch_count)
1250 _ecore_wl2_input_ungrab(input); 1250 _ecore_wl2_input_ungrab(input);
1251 1251
1252 if (input->grab.touch_count == 0) input->focus.touch = NULL; 1252 if (input->grab.touch_count == 0) input->focus.touch = NULL;