From 8fd19d1ff91da34849d45943fbb26ff33ece6e67 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 10 Dec 2025 15:17:22 +1000 Subject: [PATCH] proto: add a blurb about events to send during stop_emulating This should've been specified from day one but better late than never. Since stop_emulating is supposed to signal termination of a client emulating input, a logical assumption is that the device is set back to neutral. Let's point it out that the real behavior is within EIS but clients should behave predictably. --- proto/protocol.xml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/proto/protocol.xml b/proto/protocol.xml index c01c800..6d74daf 100644 --- a/proto/protocol.xml +++ b/proto/protocol.xml @@ -612,6 +612,12 @@ It is a protocol violation to send this request for a client of an ei_handshake.context_type other than sender. + + It is up to the EIS implementation to reset the device state when a + stop_emulating event is received. The recommendation is that the device + is set to a neutral state such that all touches, buttons, keys are logically up. + A client should send the corresponding events before stop_emulating + to avoid any ambiguity on event interpretation. @@ -1214,6 +1220,10 @@ It is a protocol violation to send this request for a client of an ei_handshake.context_type other than sender. + + A client should send a ei_button.button release event before + ei_device.stop_emulating to avoid any ambiguity on interpretation + of button events. @@ -1290,6 +1300,10 @@ It is a protocol violation to send this request for a client of an ei_handshake.context_type other than sender. + + A client should send a ei_key.key release event before + ei_device.stop_emulating to avoid any ambiguity on interpretation + of key events. @@ -1442,6 +1456,10 @@ It is a protocol violation to send a touch down in the same frame as a touch motion or touch up. + + A client should send a ei_touch.up or ei_touch.cancel event before + ei_device.stop_emulating to avoid any ambiguity on interpretation of touch + events.