aboutsummaryrefslogtreecommitdiff
path: root/backend
AgeCommit message (Collapse)Author
2022-02-21backend/wayland: remove wlr_input_device_implSimon Zeni
2022-02-21backend/x11: remove wlr_input_device_implSimon Zeni
2022-02-21types/wlr_touch: add base wlr_input_deviceSimon Zeni
wlr_touch now owns its wlr_input_device. It will be initialized when the tablet tool is initialized, and finished when the touch is destroyed.
2022-02-21types/wlr_tablet_tool: add base wlr_input_deviceSimon Zeni
wlr_tablet_tool owns its wlr_input_device. It will be initialized when the tablet tool is initialized, and finished when the tablet tool is destroyed.
2022-02-21types/wlr_tablet_pad: add base wlr_input_deviceSimon Zeni
wlr_tablet_pad owns its wlr_input_device. It will be initialized when the tablet pad is initialized, and finished when the tablet pad is destroyed.
2022-02-21types/wlr_switch: add base wlr_input_deviceSimon Zeni
wlr_switch owns its wlr_input_device. It will be initialized when the switch is initialized, and finished when the switch is destroyed.
2022-02-21types/wlr_pointer: add base wlr_input_deviceSimon Zeni
wlr_pointer owns its wlr_input_device. It will be initialized when the pointer is initialized, and finished when the pointer is destroyed.
2022-02-21types/wlr_keyboard: add base wlr_input_deviceSimon Zeni
wlr_keyboard owns its base wlr_input_device. It will be initialized when the keyboard is initialized, and finished when the keyboard is destroyed.
2022-02-21types/wlr_input_device: default vendor and product id to 0Simon Zeni
vendor and product id are set when needed by the libinput backend
2022-02-21backend/headless: remove unused wlr_headless_input_deviceSimon Zeni
2021-12-20backend: error out in autocreate without libinput supportSimon Ser
The libinput backend is now optional. However, this means that a user building wlroots without the correct libinput dependencies will end up with a compositor which doesn't respond to input events. wlr_backend_autocreate is supposed to return a sensible setup, so in this case let's just error out and explain what happened. Users can suppress the check by setting WLR_LIBINPUT_NO_DEVICES=1 (already used to suppress the zero input device case inside the libinput backend). Compositors which really want to create a bare DRM backend can easily create it manually instead of using wlr_backend_autocreate.
2021-12-19build: simplify Meson subproject fallbacksSimon Ser
All of these projects use meson.override_dependency() so we can stop referencing their internal variable name to grab the depndencies we need.
2021-12-15backend/wayland: add basic linux-dmabuf feedback supportSimon Ser
This patch makes it so we bind to zwp_linux_dmabuf_v1 version 4 and we use it to grab the main device. v4 sends supported formats via a table so we need to handle this as well. v4 allows wlroots to remove the requirement for Mesa's internal wl_drm interface.
2021-12-14backend/drm: use drmCloseBufferHandleSimon Ser
This has been added in [1] and allows us to close buffer handles without manually calling drmIoctl. [1]: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/192
2021-12-14backend/drm: use drmModeFormatModifierBlobIterNextSimon Ser
This avoids open-coding our own logic. The resulting code is more readable. References: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/146
2021-12-13backend/drm: add wlr_drm_backend_monitorChris Chamberlain
This helper is responsible for listening for new DRM devices and create new child DRM backends as necessary.
2021-12-13backend: fix return value of attempt_drm_backendChris Chamberlain
The multi backend was returned instead of the primary DRM backend.
2021-12-09Fix incorrect %zd formatting directivesSimon Ser
%zd is for ssize_t. For size_t we should use %zu.
2021-12-09output: introduce wlr_output_set_nameSimon Ser
wlroots picks names for all outputs, but it might be desirable for compositor to override it. For instance, Sway will use a headless output as a fallback in case no outputs are connected. Sway wants to clearly label the fallback output as such and label "real" headless outputs starting from HEADLESS-1.
2021-12-07build: move wayland-client dep to backend/wayland/Simon Ser
wayland-client isn't really used by wlroots core, so let's move the dep to where it's needed in the Wayland backend.
2021-12-01Fix uninitialized variable errors in release modeQuantum
When using `meson --buildtype=release`, `-Wextra -Werror` is passed. This includes `-Werror=maybe-uninitialized`, which complains about the instances fixed in this commit.
2021-11-30backend/wayland: improve wayland input device nameMoon Sungjoon
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3332 This makes input device names include it's type name
2021-11-29backend/drm: poison buffers which cannot be scanned outSimon Ser
Rather than repeatedly trying to import DMA-BUFs which cannot be scanned out, mark the failed ones with a special "poison" marker. Inspired from [1]. [1]: https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/731
2021-11-26backend/drm: always add LINEAR to supported modifiersSimon Ser
2021-11-26backend/drm: fail on explicit modifier in drmModeAddFB2Simon Ser
drmModeAddFB2 doesn't support explicit modifiers. Only accept INVALID which indicates an implicit modifier and LINEAR which may indicate that GBM_BO_USE_LINEAR has been used.
2021-11-26Require INVALID for implicit format modifiersSimon Ser
See [1] for the motivation. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/75
2021-11-25backend: remove noop backendSimon Zeni
2021-11-25backend/headless: drop wlr_headless_backend_create_with_rendererSimon Ser
The headless backend no longer needs a parent renderer: it no longer needs to return it in wlr_backend_impl.get_renderer, nor does it need to return its DRM FD in wlr_backend_impl.get_drm_fd. Drop this function altogether since it now behaves exactly like wlr_headless_backend_create.
2021-11-25backend/headless: stop picking a DRM FDSimon Ser
Sometimes the headless backend is used standalone with the Pixman renderer, sometimes it's used together with another backend which has already picked a DRM FD. In both of these cases it doesn't make sense to pick a DRM FD. Broadly speaking the headless backend doesn't really care which DRM device is used for the buffers it receives. So it doesn't really make sense to tie it to a particular DRM device. Let the backend users (e.g. wlr_renderer_autocreate) open an arbitrary DRM FD as needed instead.
2021-11-23input-device: remove wlr_input_device.linkSimon Ser
This field's ownership is unclear: it's in wlr_input_device, but it's not managed by the common code, it's up to each individual backend to use it and clean it up. Since this is a backend implementation detail, move it to the backend-specific structs.
2021-11-22backend/wayland: report parent presentation clockSimon Ser
There's no guarantee that the parent Wayland compositor uses CLOCK_MONOTONIC for reporting presentation timestamps, they could be using e.g. CLOCK_MONOTONIC_RAW or another system-specific clock. Forward the value via wlr_backend_impl.get_presentation_clock. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3254#note_1143061
2021-11-19backend/drm: scan leases on ueventSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3181
2021-11-19backend/drm: introduce wlr_drm_leaseSimon Ser
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3183
2021-11-19Introduce WLR_DEVICE_LEASE eventsSimon Ser
This will allow the DRM backend to reload its lessee list.
2021-11-19output: use XRGB8888 format instead of ARGB8888Manuel Stoeckl
Most (and possibly all) compositors using wlroots only ever render fully opaque content. To provide better performance, this change switches the default format used by wlr_output buffers from ARGB8888 to the opaque XRGB8888. Compositors like mutter, kwin, and weston already default to XRGB8888, so this change is unlikely to expose any new bugs in underlying drivers and hardware. This does not affect the hardware cursor's buffer format, which is still ARGB8888 by default. As part of this change, the X11 backend (which does not support changing format at runtime) now picks a true color, 24 bit depth visual (i.e. XRGB8888) instead of a 32 bit depth (ARGB8888) one.
2021-11-19backend: fix attempt_backend_by_name multi backend self insertionSimon Zeni
2021-11-19backend/multi: add asserts in wlr_multi_backend_addSimon Zeni
2021-11-18backend: remove wlr_backend_get_rendererSimon Zeni
2021-11-18backend/multi: remove backend_get_rendererSimon Zeni
2021-11-18backend/drm: stop initializing backend rendererSimon Zeni
2021-11-18backend/headless: don't store the parent rendererSimon Zeni
2021-11-18backend/x11: get renderer from wlr_x11_outputSimon Zeni
2021-11-18backend: remove backend_get_allocatorSimon Zeni
2021-11-18backend: remove backend ensure renderer and allocator checkSimon Zeni
2021-11-17Remove support for DMA-BUF flagsSimon Ser
They are never used in practice, which makes all of our flag handling effectively dead code. Also, APIs such as KMS don't provide a good way to deal with the flags. Let's just fail the DMA-BUF import when clients provide flags.
2021-11-15backend/headless: unlink input device on destroyRoman Gilg
Removing an input device requires unlinking it from the list of all headless input devices. For that implement a destroy function.
2021-11-02backend/drm: handle per-connector hotplug eventsSimon Ser
When a connector ID is specified in a hotplug event, don't scan all connectors. Only scan the connector that has changed.
2021-11-02backend/session: introduce wlr_device_change_eventSimon Ser
This struct contains additional information for session device change events, such as the DRM connector ID that has changed.
2021-10-31backend/wayland: use xdga client activationRonan Pigott
2021-10-29backend/drm: avoid creating empty FB_DAMAGE_CLIPS propSimon Ser
drmModeCreatePropertyBlob cannot create zero-sized blobs, that fails with EINVAL. Closes: https://github.com/swaywm/wlroots/issues/3297