Commit graph

4 commits

Author SHA1 Message Date
Kenny Levinsen
2eee9aa445 seatd: Implement ping request to wake up later
When device open or close messages are sent to seatd, libseat must read
messages from the socket until it sees the associated response message.
This means that it may drain enable/disable seat events from the socket,
queueing them internally for deferred processing.

As the socket is drained, the caller will not wake from a poll and have
no reason to dispatch libseat. To ensure that these messages would not
be left in the queue, 6fa82930d0 made it
so that open/close calls would execute all queued events just before
returning.

Unfortunately, this had the side-effect of having events fire from the
stack of libseat_open_device or libseat_close_device, which we now see
cause problems in compositors. Specifically, an issue has been observed
where libinput end up calling libseat_close_device, which in turn
dispatch a disable seat event that calls libinput_suspend. libinput does
not like this.

Instead, remove the execution from libseat_open_device and
libseat_close_device, and instead make a "ping" request to seatd if
events have been queued. The response to this will wake us up and ensure
that dispatch is called.
2021-09-21 11:18:18 +02:00
Kenny Levinsen
e86c9ec2b7 seatd: Remove unused device_closed msg body 2020-08-30 03:26:32 +02:00
Kenny Levinsen
b7b28f0628 protocol: Add note to remove device_closed msg
The content of this message is unused, so it should be converted to a
content-less message.
2020-08-29 23:12:18 +02:00
Kenny Levinsen
61716a2c77 Initial implementation of seatd and libseat 2020-07-31 00:22:18 +02:00