Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
`seatd.1` is the only man page, so it's not necessary to install it or
require scdoc when the server is not built.
|
|
If a client closed while it was disabled, the VT would not be torn down.
If the user navigated back to the VT it belonged to, they would be
stuck.
When a client is disabled, open the fd for the VT it belonged to and
perform regular teardown on it.
|
|
This simplifies logic in seat handling.
|
|
|
|
This is not strictly speaking necessary as detaching from the bus should
trigger this automatically, but elogind apparently has issues with this.
Doing this explicitly does no harm, so let's just do that.
|
|
|
|
|
|
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.
|
|
Upstream says compositors should wait for DRM nodes using udev instead.
|
|
It currently returned -1 on failure and 1 on success. The API is
intended to return -1 on failure and 0 on success, so fix that.
|
|
|
|
|
|
There is nothing for us to dispatch unless we wake on an fd, so just
retry poll if it fails with EINTR instead of doing a full dispatch loop.
|
|
The most common pain point I've seen with people trying out seat is
forgetting to add themselves to whatever group the distro has chosen
to own the socket.
Logging this error and path of the socket should make it easier to tell
why things aren't working.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Linux only requires acking release and ignores ack of acquire, but
FreeBSD is more stringent and will patiently wait for both to be acked.
Implement proper acking for both events.
|
|
|
|
FreeBSD adds one to the VT number returned by the GET_ACTIVE ioctl, so
to match things up, the wrapper here subtracted by one. This lead to
ttyv0 being named VT 0. This had the side-effect of VT numbering not
matching expectations, and switching not behaving as intended.
Align numbers with expectations, and move the required subtraction to
terminal_open, so that VT 1 matches ttyv0.
|
|
|
|
FreeBSD and Linux have different preferred socket locations. Expose an
option to set the location, and implement simple auto-logic for
linux/freebsd.
|
|
Path check was done on /dev/dri/card and /dev/dri/renderD. However,
/dev/dri/by-path is a thing, and on FreeBSD, /dev/dri/ symlinks to
/dev/drm/.
Relax Linux check to /dev/dri/, and add FreeBSD check for /dev/drm/.
|
|
|
|
If a background event was queued during call dispatch, and no unread
data was left on the socket, there would be no incentive for the user to
call dispatch, and as a result, the events would never be executed.
Execute events at the end of IPC calls that read from the socket to
avoid stalls.
|
|
Dispatch on IPC call only dispatched until the first message was
successfully processed. This could lead to premature dispatch
termination if a background event was received during an IPC call.
Instead, continue dispatching until a non-bg opcode is reported or an
error is received.
|
|
|
|
|
|
Only if a device had an fd and was active would an fd be closed. As
devices are deactivated early on session switch, this lead to fd
leakage.
Close fds regardless of active state.
|
|
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.
|
|
|
|
Signal handling relied on poll(2) being interrupted by signals, followed
by a check for signal handlers flagging a signal as received. This only
allowed signals that were received during poll(2) to be handled
correctly.
Implement the usual self-pipe implementation, where signal handlers
write an arbitrary byte to a polled file descriptor to ensure proper
level-triggered signal handling.
|
|
|
|
|
|
|
|
The connection buffer position was erroneously rewinded before reading
the protocol message when the message was a SERVER_ERROR.
|
|
We want to use the scdoc of the host system not the target system, so
pass the `native: true` parameter to meson.
|
|
|
|
|
|
|