aboutsummaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)Author
2020-11-25backend/wayland: don't set EGL visualSimon Ser
The Wayland platform doesn't have visuals. By chance, WL_SHM_FORMAT_ARGB8888 is zero, which means egl_get_config was ignoring it and everything worked fine.
2020-11-24backend/drm: stop force-probing connectorsSimon Ser
After discussing with Pekka and Daniel on #dri-devel, we concluded [1] that user-space shouldn't need to force-probe connectors. Force-probing can take some time, so using drmModeGetConnectorCurrent can result in faster start-up. Users can manually trigger a force-probe if necessary: echo detect | sudo tee /sys/class/drm/card0-DP-1/status Or just by running a tool like drm_info. A similar change has been submitted to Weston [2]. [1]: https://lists.freedesktop.org/archives/dri-devel/2020-November/287728.html [2]: https://gitlab.freedesktop.org/wayland/weston/-/issues/437
2020-11-24backend/x11: log unhandled client messagesSimon Ser
2020-11-24backend/x11: log unhandled X11 eventsSimon Ser
2020-11-24backend/x11: log errorsSimon Ser
Register an X11 error handler, and optionally use xcb-errors to print a detailed message.
2020-11-24backend/libseat: fix change_vt return valueIsaac Freund
This should return true on success and false on failure not vice-versa.
2020-11-19backend/session: add a timeout waiting for GPUsSimon Ser
If a GPU doesn't show up in 10s, bail out and return zero GPUs.
2020-11-19backend/session/logind: log when using XDG_SESSION_IDSimon Ser
This makes it easier to figure out how wlroots selected the session.
2020-11-19backend/session: replace session_signal with events.activeSimon Ser
This is more idiomatic wlroots API. The new name makes it clear that the signal is emitted when wlr_session.active changes.
2020-11-19Revert "session/logind: support CanGraphical property"Simon Ser
We now use udev to wait for DRM card devices. This reverts commit 3ebf079a9a120a27fc1008a62e7f99d5d166b745.
2020-11-19backend/session: wait for DRM device if none foundSimon Ser
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
2020-11-19backend/session: introduce wlr_session.events.add_drm_cardSimon Ser
This is triggered when a new DRM card is added. An easy way to test this patch is `modprobe vkms`.
2020-11-19backend/session: filter udev events by sysnameSimon Ser
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.
2020-11-19backend/session: operate on wlr_deviceSimon Ser
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.
2020-11-19backend/session: don't return FD on failure in open_fileSimon Ser
When wlr_session_open_file fails, don't return the FD, otherwise the caller will think the call succeeded.
2020-11-19backend/drm: Use legacy gamma size for legacy backendKenny Levinsen
We would always return the GAMMA_LUT_SIZE property if available, and only fall back to legacy gamma size otherwise. This leads to issues if both are available in differs in size while we use the legacy backend. Ensure that we only return the legacy size if we're using the legacy backend. Closes: https://github.com/swaywm/wlroots/issues/2429
2020-11-15backend/headless: implement export_dmabufSimon Ser
2020-11-15backend/headless: switch to wlr_swapchainSimon Ser
2020-11-15backend/drm: check drm_surface_render_black_frame return valueSimon Ser
This avoids hitting an assertion in drm_fb_lock_surface when we failed to render a black frame.
2020-11-15backend/drm: add support for wlr_swapchain multi-GPUSimon Ser
2020-11-15backend/drm: get rid of wlr_drm_fb_typeSimon Ser
Since all DRM FBs are backed by a wlr_buffer, there's no need for this anymore.
2020-11-15backend/drm: add support for wlr_swapchain buffer ageSimon Ser
2020-11-15backend/drm: use wlr_swapchainSimon Ser
2020-11-15backend/libinput: require libinput 1.14Simon Ser
We have the policy of requiring up-to-date dependencies instead of adding conditionals for older versions. libinput 1.14 was published more than 1 year ago.
2020-11-12backend/wayland: Set cursor indivdualy per outputMykola Orliuk
2020-11-12backend/wayland: Add active pointer per host seatMykola Orliuk
Every host seat with pointer capability propagates events to one of sub-pointer depending which output window we entered. active_pointer tracks reference to sub-pointer on enter/leave events to avoid lookup for it on every move events. Fixes swaywm/wlroots#1499
2020-11-12backend/wayland: Bind pointer listener to seatMykola Orliuk
2020-11-12backend/wayland: Listen to pointers from all seatsMykola Orliuk
This effectively gets swaywm/wlroots#1499 to the point where functionality somewhat preserved and no crash happens. We still can have only one cursor, but we can control it from multiple seats in time-sharing manner by entering/leaving output.
2020-11-12backend/wayland: Use seat name in input namesMykola Orliuk
2020-11-12backend/wayland: Add registering multiple seatsMykola Orliuk
2020-11-12backend/wayland: Link input devices with seatsMykola Orliuk
2020-11-12backend/wayland: Bind seat listener to wlr_wl_seatMykola Orliuk
2020-11-11Remove unneeded includes from wlr_input_device.hIsaac Freund
This uncovered many places where we were using things without directly including them.
2020-11-11Replace wlr_key_state with wl_keyboard_key_stateIsaac Freund
There's no reason to have duplicate enums
2020-11-05backend/drm: export pending FB in export_dmabuf, if anySimon Ser
This allows callers to grab the current frame right after committing it, without having to incur a full vblank worth of latency.
2020-11-03backend/drm: fix "a page-flip is already pending" errors on modesetSimon Ser
When performing a modeset, the DRM backend will request a page-flip event. However frame_pending wasn't set to true, so any subsequent wlr_output_schedule_frame calls would imemdiately trigger a synthetic frame event, asking the compositor to submit a new frame. Committing the new frame fails with "a page-flip is already pending" error in the DRM backend.
2020-10-30backend/drm: Check if output is enabled before sending frame eventMarten Ringwelski
When an output is disabled one last pageflip will happen to disable it. Currently this pageflip causes a frame event. Since the output is disabled we don't want to send this frame event.
2020-10-18backend/wayland: fix some keyboard/touch leaksMykola Orliuk
2020-10-18backend/wayland: fix input creation error handlingMykola Orliuk
2020-10-18backend/wayland: add error flow in create_wl_seatMykola Orliuk
2020-10-18backend/wayland: factor out wlr_wl_seatMykola Orliuk
2020-10-18backend/wayland: manage cursor for current pointerMykola Orliuk
2020-10-18backend/wayland: add touch support to the wayland backendIlia Bozhinov
Goal currently is to get support working for a single output, thus there is only one touch device created. Multi-output support is left for later.
2020-10-10backend/libinput: improve logger callbackSimon Ser
- Add a prefix to make it clear log messages come from libinput - Properly convert libinput log priority to wlroots'
2020-09-16backend: remove check for _WAYLAND_DISPLAYSimon Ser
I'm not sure what this was used for, but it's not used by libwayland. Setting _WAYLAND_DISPLAY would result in the Wayland backend being picked but would ignore the actual value of the env variable.
2020-09-04Accommodate for CONFIG_VT=0, all TTYs are in seat0, but not allnerdopolis
seat0s have TTYs
2020-09-04session: Don't refuse unprivileged creation of "direct" backendPatrick Steinhardt
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.
2020-09-04wayland: emit relative pointer events only for current pointerIlia Bozhinov
2020-09-02Quieten failure to set login session typeRyan Walklin
(almost certainly due to systemd version <246)
2020-09-01backend/session/libseat: register log handlerSimon Ser
Route libseat errors through wlroots logging infrastructure. This requires libseat 0.2.0.