From f3ac8d03feddf78f90e26c94969c61bd982cf460 Mon Sep 17 00:00:00 2001 From: Stephen Chandler Paul Date: Thu, 19 Feb 2015 11:51:54 +1000 Subject: [PATCH] tablet: mark all axes as unchanged before the proximity out event When the tablet goes out of proximity we provide the last-known axis status (which was sent in a previous axis event anyway), make sure the changed_axis bitfield is unset for all axes though. Signed-off-by: Stephen Chandler Paul Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index 4a0d4b24..eccbcc9c 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -508,6 +508,7 @@ tablet_flush(struct tablet_dispatch *tablet, } if (tablet_has_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY)) { + memset(tablet->changed_axes, 0, sizeof(tablet->changed_axes)); tablet_notify_proximity(&device->base, time, tool, @@ -517,7 +518,6 @@ tablet_flush(struct tablet_dispatch *tablet, tablet_set_status(tablet, TABLET_TOOL_OUT_OF_PROXIMITY); tablet_unset_status(tablet, TABLET_TOOL_LEAVING_PROXIMITY); - memset(tablet->changed_axes, 0, sizeof(tablet->changed_axes)); tablet_change_to_left_handed(device); }