Age | Commit message (Collapse) | Author |
|
sd_bus_call drains received messages into the receive queue, and peeks
for its own return value. It does not dispatch the receive queue.
As the socket is drained, the caller will not wake from a poll and have
no reason to dispatch libseat. This has gone unnoticed largely due to
logind sending an event for every device, making it unlikely that no
unread message will be left on the socket.
Like we have done for seatd, we fix this by sending a "ping" request to
logind if anything is left in our receive queue as reported by
sd_bus_get_events. The response to this will wake us up and ensure that
dispatch is called.
|
|
|
|
libseat will never write to that struct. Let's allow callers to
make it read-only.
|
|
This name never made much sense. dispatch_and_execute is more
meaningful, especially when compared to the non-executing dispatch
function.
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
The logind code is based on the wlroots implementation, which in turn
contained copy-paste code from Mutter that serves no purpose here.
|
|
|
|
|
|
|
|
|
|
Error handling was broken in close_device, always returning -1.
Use the return value, and add a few errno assignments while we're at it.
|
|
|
|
|
|
|