[PATCH weston 19/25] input: do not forward unmatched touch-ups

Pekka Paalanen ppaalanen at gmail.com
Fri Mar 23 12:00:59 UTC 2018


From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>

Commit a30e29af2e4d0ad6fc476ae7cc13c4cad5119217 introduced the code to
deal with a touchscreen with touches already down when Weston starts
using it. It fixed the touchpoint counting problem.

However, Weston still should not forward or process the unmatched
touch-ups either. Code inspection says it would confuse the
idle-inhibit counting, and it could probably confuse clients as well.
Hence, just drop unmatched touch-ups.

Enhance the warning message to allow identifying where the event came
from.

Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
---
 libweston/input.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libweston/input.c b/libweston/input.c
index 17a0c051..7e4677e6 100644
--- a/libweston/input.c
+++ b/libweston/input.c
@@ -2459,8 +2459,9 @@ notify_touch_cal(struct weston_touch_device *device,
 			 * more fingers on the touch screen, in which
 			 * case we didn't get the corresponding down
 			 * event. */
-			weston_log("unmatched touch up event\n");
-			break;
+			weston_log("Unmatched touch up event on seat %s, device %s\n",
+				   seat->seat_name, device->devpath);
+			return;
 		}
 		weston_compositor_idle_release(seat->compositor);
 
-- 
2.16.1



More information about the wayland-devel mailing list