aboutsummaryrefslogtreecommitdiff
path: root/seatd/client.c
AgeCommit message (Collapse)Author
2021-09-21seatd: Implement ping request to wake up laterKenny Levinsen
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.
2021-03-21client: enable cr_pid on FreeBSD >= 12.3Jan Beich
https://cgit.freebsd.org/src/commit/?id=925f44f33862908f9a2e72520a17af148c7d0db5 https://cgit.freebsd.org/src/commit/?id=2b61bda2c75f30f6eadd18fb891fd885e4c8d19d
2021-03-02Normalize log texts a bitKenny Levinsen
2021-02-27client: Remove link if seat_add_client succeedsKenny Levinsen
Removing the link before before means that we can return without a link, resulting in a double-remove.
2021-02-27client: Replace pending_disable with state enumKenny Levinsen
This simplifies logic in seat handling.
2020-12-10client: Fix typo in cr_pid usageKenny Levinsen
2020-12-08client: Use cr_pid if availableKenny Levinsen
This is only available on FreeBSD 13, so test for that version.
2020-12-08client: Do not use SOL_SOCKET for LOCAL_PEERCREDKenny Levinsen
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.
2020-11-23client: More robust handling of client linksKenny Levinsen
2020-09-22seat: Rework seat activation/switch logicKenny Levinsen
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.
2020-09-22client: Remove unnecessary active_client checkKenny Levinsen
2020-09-01client: Only unlink if on the idle listKenny Levinsen
2020-09-01Move list removal to seat/client destroyKenny Levinsen
2020-08-31client: Do not leak idle clients on exitKenny Levinsen
2020-08-30seatd: Explicit cast -1 to unsigned gid_tKenny Levinsen
Silences a warning on some architectures.
2020-08-30seatd: Slight error handling cleanupKenny Levinsen
2020-08-30seatd: Remove unused device_closed msg bodyKenny Levinsen
2020-08-29seat: Destroy all clients on teardownKenny Levinsen
2020-08-04client: Sanitize shutdown/kill mechanismKenny Levinsen
2020-08-03client: TidyingKenny Levinsen
2020-08-03seat: Convert device list to linked listKenny Levinsen
2020-08-03client: Prefix notification methods with 'send'Kenny Levinsen
2020-08-02seat: Deactivate devices before sending disableKenny Levinsen
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
2020-08-01client: Implement get_peer for FreeBSDKenny Levinsen
2020-07-31Initial implementation of seatd and libseatKenny Levinsen