libei/src
Erik Jensen 1152c038ee Specify MODIFIERS to be sent for any state change.
Updates protocol and API documentation to specify that the modifiers
event should be sent by the EIS implementation every time the modifier
or group state changes, including when the change is triggered by key
events on the emulated keyboard.

The previous approach of expecting the client to track modifier state
using xkb_state_update_key() for injected keys resulted in multiple
opportunities for the client and server to get out of sync (both due to
unavoidable race conditions and due the client not having access to the
complete state used by the server to calculate state changes), with no
way for the client to ensure it had a correct modifier map short of
unbinding and rebinding the seat.

The new approach allows the client to track state solely by applying
modifiers events with xkb_state_update_mask(), simplifying client
implementation. Because the event is sent for all changes, the client
can use ei_connection.sync / ei_ping() to ensure that it has received
the latest state incorporating all key requests sent prior to the sync
request (along with any externally-caused modifier state changes that
may have occured up to the time the sync message was received).

Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/318>
2024-12-18 04:41:11 +00:00
..
brei-proto.h.tmpl brei: move the object_id_t typedefs to the brei-proto.h header 2023-05-18 14:03:26 +10:00
brei-shared.c test: fix 64-bit pointer access for the object ids 2023-08-31 13:42:25 +10:00
brei-shared.h brei: move the object_id_t typedefs to the brei-proto.h header 2023-05-18 14:03:26 +10:00
ei-proto.c.tmpl log: remove trailing linebreaks from log messages 2023-05-29 17:54:20 +10:00
ei-proto.h.tmpl brei: move the object_id_t typedefs to the brei-proto.h header 2023-05-18 14:03:26 +10:00
libei-button.c Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libei-button.h Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libei-callback.c ei: removed unused ei_callback_new_for_id 2023-06-07 23:08:16 +00:00
libei-callback.h ei: removed unused ei_callback_new_for_id 2023-06-07 23:08:16 +00:00
libei-connection.c ei: add ei_ping() and the matching EI_EVENT_PONG 2024-12-18 04:30:01 +00:00
libei-connection.h ei: add ei_ping() and the matching EI_EVENT_PONG 2024-12-18 04:30:01 +00:00
libei-device.c Add the ei_touchscreen.cancel event and ei_touch_cancel() 2024-12-17 15:12:56 +10:00
libei-device.h Add a mapping_id to the regions 2023-08-30 09:18:26 +10:00
libei-event.c ei: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libei-event.h ei: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libei-fd.c ei: rename ei_set_connection to ei_set_socket 2023-03-03 11:20:42 +10:00
libei-handshake.c ei: revamp the internal sync callback 2024-12-18 04:30:01 +00:00
libei-handshake.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei-keyboard.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei-keyboard.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei-log.c util: rename xvasprintf to xvaprintf 2023-02-16 15:29:18 +10:00
libei-ping.c ei: add ei_ping() and the matching EI_EVENT_PONG 2024-12-18 04:30:01 +00:00
libei-pingpong.c ei: remove unused ei_pingpong_new() 2023-06-07 23:08:16 +00:00
libei-pingpong.h ei: remove unused ei_pingpong_new() 2023-06-07 23:08:16 +00:00
libei-pointer-absolute.c Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libei-pointer-absolute.h Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libei-pointer.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei-pointer.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei-private.h ei: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libei-region.c Add a mapping_id to the regions 2023-08-30 09:18:26 +10:00
libei-region.h Add a mapping_id to the regions 2023-08-30 09:18:26 +10:00
libei-scroll.c Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libei-scroll.h Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libei-seat.c Add a few missing va_end 2024-09-11 12:25:41 +10:00
libei-seat.h protocol: replace the capabilities enum with an interface list 2023-05-02 05:53:25 +00:00
libei-socket.c ei: rename ei_set_connection to ei_set_socket 2023-03-03 11:20:42 +10:00
libei-touchscreen.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei-touchscreen.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libei.c ei: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libei.h Specify MODIFIERS to be sent for any state change. 2024-12-18 04:41:11 +00:00
libeis-button.c Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libeis-button.h Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libeis-callback.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-callback.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-client.c eis: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libeis-client.h eis: drop the vestiges of client restrictions 2023-05-08 13:38:40 +10:00
libeis-connection.c eis: add eis_ping() and the matching EIS_EVENT_PONG 2024-12-18 04:30:01 +00:00
libeis-connection.h eis: add eis_ping() and the matching EIS_EVENT_PONG 2024-12-18 04:30:01 +00:00
libeis-device.c Add the ei_touchscreen.cancel event and ei_touch_cancel() 2024-12-17 15:12:56 +10:00
libeis-device.h eis: expose eis_device_get_context() and eis_seat_get_context() 2023-06-01 18:42:16 +10:00
libeis-event.c eis: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libeis-event.h eis: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libeis-fd.c eis: Remove eis_backend_fd_add_fd() 2022-04-27 02:00:07 +00:00
libeis-handshake.c eis: revamp the internal sync callback 2024-12-18 04:30:01 +00:00
libeis-handshake.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-keyboard.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-keyboard.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-log.c util: rename xvasprintf to xvaprintf 2023-02-16 15:29:18 +10:00
libeis-ping.c eis: add eis_ping() and the matching EIS_EVENT_PONG 2024-12-18 04:30:01 +00:00
libeis-pingpong.c protocol: widen the callback_data arg for ping/sync to 64bit 2023-05-16 15:09:47 +10:00
libeis-pingpong.h protocol: widen the callback_data arg for ping/sync to 64bit 2023-05-16 15:09:47 +10:00
libeis-pointer-absolute.c Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libeis-pointer-absolute.h Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libeis-pointer.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-pointer.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-private.h eis: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libeis-region.c Add a mapping_id to the regions 2023-08-30 09:18:26 +10:00
libeis-region.h Add a mapping_id to the regions 2023-08-30 09:18:26 +10:00
libeis-scroll.c Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libeis-scroll.h Split the ei_pointer interface up into its components 2023-05-02 05:53:25 +00:00
libeis-seat.c eis: only queue a seat bind event if the caps change 2023-11-08 23:24:45 +00:00
libeis-seat.h eis: only queue a seat bind event if the caps change 2023-11-08 23:24:45 +00:00
libeis-socket.c Drop the trailing newline from the log messages 2022-08-11 10:09:27 +10:00
libeis-touchscreen.c Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis-touchscreen.h Switch object ids to use the object_id_t typedef 2023-03-03 11:27:01 +10:00
libeis.c eis: add EI_EVENT_SYNC as opaque event to correctly schedule callbacks 2024-12-18 04:30:01 +00:00
libeis.h Specify MODIFIERS to be sent for any state change. 2024-12-18 04:41:11 +00:00
liboeffis.c oeffis: rewrite sender_name to make the analyzer happy 2024-09-11 12:27:38 +10:00
liboeffis.h oeffis: OEFFIS_DEVICE_ALL_DEVICES should translate to "all" 2023-12-14 00:58:18 +00:00
meson.build eis: add eis_ping() and the matching EIS_EVENT_PONG 2024-12-18 04:30:01 +00:00
util-bits.c util: add some mask helpers 2023-03-03 11:16:48 +10:00
util-bits.h util: add some mask helpers 2023-03-03 11:16:48 +10:00
util-color.h Add SPDX identifiers to all source files 2022-03-03 00:27:36 +00:00
util-io.c util: use xalloc instead of calloc to avoid NULL checks 2024-09-11 12:27:38 +10:00
util-io.h Add a few missing va_end 2024-09-11 12:25:41 +10:00
util-list.c util: add the macros to run through a list backwards 2022-05-17 14:36:39 +10:00
util-list.h util: add the macros to run through a list backwards 2022-05-17 14:36:39 +10:00
util-logger.c util-object: split macro to generate unref into one two 2022-03-03 05:41:15 +00:00
util-logger.h Add SPDX identifiers to all source files 2022-03-03 00:27:36 +00:00
util-macros.h util: Add the trace() debugging macro 2024-12-03 05:25:33 +00:00
util-mem.h util: fix a comment to use the right decimal marker for english 2024-09-11 12:27:38 +10:00
util-memfile.c util/memfile: use MAP_SHARED to create the map 2024-07-29 14:48:34 +10:00
util-memfile.h util/memfile: include stddef for size_t 2024-07-29 14:48:34 +10:00
util-memmap.c util/memmap: add a helper wrapper around mmap 2024-07-29 14:48:34 +10:00
util-memmap.h util/memmap: add a helper wrapper around mmap 2024-07-29 14:48:34 +10:00
util-munit.c util: add a global setup option to our munit wrapper 2023-10-24 18:25:25 +10:00
util-munit.h Revert "util: silence out-of-bounds read warning" 2024-11-26 15:33:36 +10:00
util-object.h util: add macros to declare getters and setters 2023-02-13 13:27:57 +10:00
util-sources.c test: add a few non-null checks to make the static analyzer happy 2024-09-11 12:26:40 +10:00
util-sources.h util: allow sources to have write notifications 2023-10-11 00:41:13 +00:00
util-strings.c util: use xalloc instead of calloc to avoid NULL checks 2024-09-11 12:27:38 +10:00
util-strings.h util: correct the fd validity check 2024-09-11 12:27:38 +10:00
util-structs.h Add SPDX identifiers to all source files 2022-03-03 00:27:36 +00:00
util-time.h util: add msleep() 2023-03-03 11:16:48 +10:00
util-tristate.h Remove empty trailing newlines from all files 2023-03-13 08:52:08 +10:00
util-version.h Add a version macro for grepable version numbers 2022-09-07 09:20:27 +10:00