Age | Commit message (Collapse) | Author |
|
|
|
All of these projects use meson.override_dependency() so we can
stop referencing their internal variable name to grab the
depndencies we need.
|
|
This helper is responsible for listening for new DRM devices and
create new child DRM backends as necessary.
|
|
This will allow the DRM backend to reload its lessee list.
|
|
This struct contains additional information for session device
change events, such as the DRM connector ID that has changed.
|
|
Instead of hardcoding the string "card", use DRM_PRIMARY_MINOR_NAME.
Some systems may use another prefix, e.g. OpenBSD uses "drm" instead.
|
|
This moves the magic incantation into libdrm and is clearer. See
[1] for details.
While at it, fixup the doc comment and improve logging.
[1]: https://gitlab.freedesktop.org/mesa/drm/-/commit/523b3658aa8efa746417e916c987de23740ce313
|
|
|
|
|
|
This was lost in the session_impl removal refactor.
|
|
libseat provides all session functionality, so there is no longer need
for a session backend abstraction. The libseat device ID, seat handle
and event loop handle are moved to the main wlr_session and wlr_device
structs.
|
|
This is instead delegated to libseat.
|
|
This is instead delegated to libseat.
|
|
|
|
This is instead delegated to libseat.
|
|
When libseat is built as a subproject, we're not interested in
building the server or the man pages.
|
|
This allows libseat to be compiled as a Meson subproject when it's
not installed system-wide. This can ease development and compilation
on distributions where libseat isn't packaged.
|
|
|
|
As explained in [1], user-space should perform a drmModeGetResources
call to figure out whether a device supports KMS.
[1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/127
|
|
This allows us to easily iterate on all features and only deal with
bools.
|
|
This requires a change to the type of `struct wlr_tablet` and
`wlr_tablet_init` signature, both of which are part of the unstable API.
|
|
Sometimes wlr_session_find_gpus will encounter an error. This is
different from finding zero GPUs.
On error, wlr_session_find_gpus already returns -1. However, this is
casted to size_t, so callers uncorrectly assume this is a success.
Instead, make wlr_session_find_gpus return a ssize_t and allow callers
to handle the error accordingly.
|
|
libseat will call logind's SetType method if necessary.
|
|
This should return true on success and false on failure not vice-versa.
|
|
If a GPU doesn't show up in 10s, bail out and return zero GPUs.
|
|
This makes it easier to figure out how wlroots selected the session.
|
|
This is more idiomatic wlroots API. The new name makes it clear that the
signal is emitted when wlr_session.active changes.
|
|
We now use udev to wait for DRM card devices.
This reverts commit 3ebf079a9a120a27fc1008a62e7f99d5d166b745.
|
|
Wait for a DRM device if none is found in wlr_session_find_gpus. This
can happen if the compositor is loaded before the display kernel driver.
This supersedes the logind CanGraphical property.
To test, e.g. with i915 and sway:
rmmod -f i915
sway &
modprobe i915
Closes: https://github.com/swaywm/wlroots/issues/2093
|
|
This is triggered when a new DRM card is added.
An easy way to test this patch is `modprobe vkms`.
|
|
We're only interested in card devices. The loop over wlr_session.devices
would take care of ignoring non-card events, but a future patch will
listen to udev "add" events as well.
|
|
Instead of operating on FDs in {open,close}_device, operate on
wlr_devices. This avoids the device lookup in wlr_session and allows
callers to have access to wlr_device fields.
For now, we use it to remove wlr_session_signal_add and replace it with
a more idiomatic wlr_session.events.change field. In the future, other
events will be added.
|
|
When wlr_session_open_file fails, don't return the FD, otherwise the
caller will think the call succeeded.
|
|
seat0s have TTYs
|
|
When starting a compositor that's using the "direct" session backend,
wlroots needs to handle calls to `drmSetMaster()` and `drmDropMaster()`.
As both calls used to require `CAP_SYS_ADMIN`, wlroots thus simply
refused starting in case the process doesn't enjoy evelated privileges.
Permission rules have changed since linux.git commit 45bc3d26c95a (drm:
rework SET_MASTER and DROP_MASTER perm handling, 2020-03-19). As a
result, starting with Linux v5.8, both ioctls will now also succeed if
the process is currently or has been the DRM master. And as the first
process to open render nodes will become the DRM master automatically,
this effectively means that process elevation is not strictly required
in all setups anymore.
So let's drop the `geteuid() != 0` permission check to allow those new
rules to do their magic.
|
|
(almost certainly due to systemd version <246)
|
|
Route libseat errors through wlroots logging infrastructure.
This requires libseat 0.2.0.
|
|
bad1e9afa8ea ("session: Add libseat backend") introduced a change to to
how session backends initialize, but failed to update the FreeBSD
specific version of the direct backend accordingly.
Closes: https://github.com/swaywm/wlroots/issues/2376
|
|
|
|
|
|
|
|
|
|
|
|
This is simply a false sense of security, and is worse than just using
setuid. CAP_SYS_ADMIN is an extremely serious capability that is
effectively as powerful as root.
It also required users to be in the input group, which allows any
process to keylog the entire system.
|
|
This speeds up shutdown significantly, and is in line with how Weston
does it.
|
|
The logind provider defaulted to systemd and in order to use elogind,
-Dlogin-provider=elogind was required. This adds 'auto' as a choice
for the login-provider option and sets it as default. Using 'auto',
the build will check for systemd first and if it's not found, try
to find and use elogind automatically.
|
|
https://github.com/FreeBSDDesktop/libudev-devd/commit/f11ee5b418c740ba6fd4c946ab10b0d89702e4d0
|
|
Bumps minimum version to 0.51.0
- Remove all intermediate static libraries.
They serve no purpose and are just add a bunch of boilerplate for
managing dependencies and options. It's now managed as a list of
files which are compiled into libwlroots directly.
- Use install_subdir instead of installing headers individually.
I've changed my mind since I did that. Listing them out is annoying as
hell, and it's easy to forget to do it.
- Add not_found_message for all of our optional dependencies that have a
meson option. It gives some hints about what option to pass and what
the optional dependency is for.
- Move all backend subdirectories into their own meson.build. This
keeps some of the backend-specific build logic (especially rdp and
session) more neatly separated off.
- Don't overlink example clients with code they're not using.
This was done by merging the protocol dictionaries and setting some
variables containing the code and client header file.
Example clients now explicitly mention what extension protocols they
want to link to.
- Split compositor example logic from client example logic.
- Minor formatting changes
|
|
Previously, the path of TTY is generated using snprintf with %d format.
It works with TTY 1 to 10, but fails with TTY with greater number
because the number used in the name is in base 32 instead of base 10.
Since there is no standard function to convert a number to a string with
a custom base, this commit adds a function to do it.
Fixes: https://github.com/swaywm/wlroots/issues/1854
|
|
The original signal matching was using the old interface before
sd_bus_match_signal was added, which the new code uses.
Change them all to use it now.
|