summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2022-05-05 09:49:51 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2022-05-10 09:52:04 +1000
commit1f21c8c7fca37c15e0d8a6f7c7f89519c5947829 (patch)
tree719eb5c255d0b1148df6717d6ea6dd70c2325dfa
parent2f1a7ae905886fb1441d45b97c8e9952a1c3a878 (diff)
downloadxf86-input-wacom-1f21c8c7fca37c15e0d8a6f7c7f89519c5947829.tar.gz
test: ensure a device prox out after our events
This avoids a potential stuck button by leaving the tablet in proximity. Shouldn't happen since removing the device should release all buttons but... Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Aaron Skomra <aaron.skomra@wacom.com>
-rw-r--r--test/test_wacom.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_wacom.py b/test/test_wacom.py
index d3e315d..dd115fd 100644
--- a/test/test_wacom.py
+++ b/test/test_wacom.py
@@ -190,6 +190,14 @@ def test_axis_updates(mainloop, opts, axis):
mainloop.run()
logger.debug(f"We have {len(monitor.events)} events")
+ # Force a prox-out so we don't get stuck buttons. We don't call
+ # mainloop.run() because we don't want to collect the prox out.
+ ev = [
+ Sev("BTN_TOOL_PEN", 0),
+ Sev("SYN_REPORT", 0),
+ ]
+ monitor.write_events(ev)
+
events = iter(monitor.events)
# Ignore the proximity event since all axes change there by necessity
_ = next(events)