Age | Commit message (Collapse) | Author |
|
Instead of using a stub, error out when get_peer isn't implemented
for the target platform. client_create relies on it.
|
|
|
|
If we're part of the libseat builtin backend, then we only have one
client. Shut down the server when this client disconnects.
|
|
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, 6fa82930d0c5660eea3102989c765dc864514e36 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.
|
|
https://cgit.freebsd.org/src/commit/?id=925f44f33862908f9a2e72520a17af148c7d0db5
https://cgit.freebsd.org/src/commit/?id=2b61bda2c75f30f6eadd18fb891fd885e4c8d19d
|
|
|
|
Removing the link before before means that we can return without a link,
resulting in a double-remove.
|
|
This simplifies logic in seat handling.
|
|
|
|
This is only available on FreeBSD 13, so test for that version.
|
|
This is wrong, and leads to LOCAL_PEERCRED being interpreted as
SO_DEBUG. 0 should be used instead.
See: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246189.
|
|
|
|
The seat activation logic did not correctly handle VT switching and
switching between multiple sessions.
Session switching on VT-bound seats is now performed using a VT switch,
taking advantage of VT signals to perform the actual switch. This
simplifies switching logic and makes it more robust.
|
|
|
|
|
|
|
|
|
|
Silences a warning on some architectures.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previously, seatd would not deactivate devices until the client had
acked the disable. In once instance, this lead to libinput spending
significant time checking and closing each input device.
As a workaround, mimick logind's behavior of deactivating devices first.
The original behavior can be reintroduced if the client-side problem is
fixed.
Closes: https://todo.sr.ht/~kennylevinsen/seatd/5
|
|
|
|
|