wl2_input: fix a problem that occurs in case of using both pointer/touch input devices 62/205262/1
authorWonki Kim <wonki_.kim@samsung.com>
Tue, 30 Apr 2019 15:27:25 +0000 (11:27 -0400)
committerWonki Kim <wonki_.kim@samsung.com>
Thu, 2 May 2019 00:57:58 +0000 (09:57 +0900)
commit0fe620fc194c73a9acdebd1a2240b35b31d69307
tree3d59b72255aaac19f39a96164aa6a3621f4fce26
parent3e5ae250b5d3b694f5f47bcd1166f286ebc829e0
wl2_input: fix a problem that occurs in case of using both pointer/touch input devices

Summary:
if wl2_input logic gets a 'touch down' event from touch device,
input->focus.touch has set and it cause the logic handles every input as touch input
from that moment at _ecore_wl2_input_mouse_move_send function.
that is the reason why the patch(410c1f95879e46a5e52132662d4c43b74e95a251) has written for.

however, if there are multiple touch input devices,
clearing focus.touch variable without checking any conditions causes another problem.

I mean a case such as 'touch 1 down' -> 'touch 2 down' -> 'touch 1 up' -> 'touch 2 up'
at the moment 'touch 1 up' event executed, focus.touch would be cleared,
and 'touch 2 up' and following touch events will not be executed properly at the moment.

this patch counts a number of touch devices which are grabbing to clear focus.touch at proper time.

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8787

Change-Id: I95b64df82f17069762aa93a60b0eb048805e5bac
Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>
src/lib/ecore_wl2/ecore_wl2_input.c
src/lib/ecore_wl2/ecore_wl2_private.h