mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-02 07:30:11 +01:00
This event is required to fix an issue with the current
ei_callback.done handling in libeis: previously we would imediately send
the ei_callback.done upon receiving ei_connection.sync from the client.
This results in incorrect behavior as we may have events in the queue
(and/or pending a frame) that the EIS implementation hasn't seen yet.
For example a client sending:
- ei_pointer.motion
- ei_connection.sync
- ei_device.frame
- ei_connection.sync
Will queue a motion + frame event on the EIS side during eis_dispatch()
but immediately receive done events for both sync requests.
This could be handled purely internally by keeping the sync event in the
queue but hidden to the caller - and automatically calling done when
it's that events turn, i.e. something like:
```
struct eis_event *eis_get_event(struct eis) {
struct eis_event *e = first_event(eis);
if (e == EIS_EVENT_SYNC) {
eis_callback_send_done(e);
eis_event_unref(e);
e = next_event(eis);
}
return e;
}
```
but that opens us up to a set of potential bugs detailed in
https://gitlab.freedesktop.org/libinput/libei/-/issues/71#note_2694603
So let's go the easy route by having a new event type that does nothing
other than eis_event_unref() in the EIS implementation. This way we can
queue the event and have everything behave in-order and as expected.
Closes #71
Part-of: <https://gitlab.freedesktop.org/libinput/libei/-/merge_requests/316>
|
||
|---|---|---|
| .. | ||
| templates | ||
| buildtest.c | ||
| buildtest.cc | ||
| conftest.py | ||
| eierpecken.c | ||
| eierpecken.h | ||
| eiproto.py.tmpl | ||
| meson.build | ||
| test-ei-device.c | ||
| test-ei-seat.c | ||
| test-ei.c | ||
| test-eis.c | ||
| test-main.c | ||
| test_oeffis.py | ||
| test_protocol.py | ||
| test_scanner.py | ||
| unit-tests.c | ||