aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-02-21backend/headless: unconditionally accept all output layersSimon Ser
We don't need to do anything special to handle these.
2023-02-21backend/drm: drop wlr_drm_layer.pending_{width,height}Simon Ser
No need to store this info in struct wlr_drm_layer. We can just extract the size when we need it.
2023-02-21output: expose wlr_output_state_set_buffer()Simon Ser
2023-02-21output: expose wlr_output_state_finish()Simon Ser
Same as the original function, but check for the bitfield before calling pixman_region32_fini(), because that function expects an initialized region.
2023-02-21screencopy-v1: drop unnecessary pixman_region32_t castsSimon Ser
The Pixman API now accepts const parameters.
2023-02-21backend/drm: drop unnecessary pixman_region32_t castsSimon Ser
The Pixman API now accepts const parameters.
2023-02-21xwayland: Send synthetic ConfigureNotify per ICCCM 4.1.5John Lindgren
X11 clients expect a ConfigureNotify after a ConfigureRequest. If the compositor/window manager chooses not to honor the request (e.g. due to the window being maximized), XWayland will not send a "real" ConfigureNotify event and the window manager is expected to send a synthetic event instead. Otherwise, the X11 client is left waiting and may not repaint its window properly. For comparison, see Openbox's client_configure() or Weston's weston_wm_window_send_configure_notify(). v2: Move logic to wlr_xwayland_surface_configure()
2023-02-20wlr_scene: Add dmabuf_feedback helperAlexander Orzechowski
2023-02-20wlr_scene: Extract considering logic for direct scanoutAlexander Orzechowski
2023-02-20wlr_scene: Cleanup header includesAlexander Orzechowski
We don't need to pull wlr_compositor.
2023-02-20examples/output-layers: relay feedback eventsSimon Ser
2023-02-20linux-dmabuf-v1: add helper for output layer feedback eventsSimon Ser
2023-02-20backend/drm: send output layer feedback eventsSimon Ser
2023-02-20output-layer: add feedback eventSimon Ser
2023-02-20backend/drm: add support for output layersSimon Ser
2023-02-20backend/drm: add libliftoff composition layerSimon Ser
This will be useful for implementing the output layers API.
2023-02-20backend/drm: add libliftoff interfaceSimon Ser
2023-02-20backend/drm: init wlr_drm_plane for all plane typesSimon Ser
2023-02-20examples/output-layers: new exampleSimon Ser
2023-02-20backend/wayland: implement output layersSimon Ser
2023-02-20output: add wlr_output_set_layers()Simon Ser
2023-02-20Add wlr_output_layerSimon Ser
This is based on previous work [1] [2]. This new API allows compositors to display buffers without needing to perform rendering operations. This API can be implemented on Wayland using subsurfaces and on DRM using KMS planes. Compared to [1], this approach leverages wlr_addon_set to let backends attach their own private state to layers, removes the pending state (necessary for interop with wlr_output_commit_state()) and enum wlr_output_layer_state_field. [1]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/1985 [2]: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3447
2023-02-19build: enable subproject for libxkbcommonSimon Ser
References: https://github.com/xkbcommon/libxkbcommon/pull/315
2023-02-18Revert "render/egl: skip incompatible EGL devices"Simon Zeni
Reverts commit c73e20628ad3cf8a38fc1cebd061a49da8708394. This caused a regression in the GLES2 renderer because `egl->exts.EXT_device_drm` is set in `egl_init_display()`, which is invoked after `get_egl_device_from_drm_fd()`. So the function will always return `EGL_NO_DEVICE_EXT`.
2023-02-17fullscreen-shell: add release request handlerVasyl Vavrychuk
2023-02-16render/egl: skip incompatible EGL devicesEric Engestrom
Without EGL_EXT_device_drm, eglQueryDeviceStringEXT(EGL_DRM_DEVICE_FILE_EXT) further below is invalid.
2023-02-15build: set pkgconfig URLSimon Ser
For informational purposes.
2023-02-15build: remove unnecessary pkgconfig argumentsSimon Ser
If left unspecified, these defaults to the project name and version.
2023-02-13xwayland: Read and publish _NET_WM_STRUT_PARTIAL propertyJohn Lindgren
This is needed for compositors that want to reserve space for XWayland panels. Such a feature can be useful in a "transitional" setup, where only the X11 window manager and compositor is replaced but other components of an X11 desktop environment are still used. This change simply reads the X11 property; the compositor is free to ignore it. Thus, compositors that don't want to support such a "transitional" feature are not impacted. v2: Update xwayland_surface_associate()
2023-02-13Switch IRC channel to #wlrootsSimon Ser
The #sway-devel channel is now for Sway development only. #wlroots is the new channel to use for wlroots. We were using #sway-devel mostly for histerical raisins. Nowadays many wlroots developers are not working on Sway. Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3586
2023-02-08scene: Add fractional scale handlingKenny Levinsen
2023-02-08wp-fractional-scale-v1: new protocol implementationKenny Levinsen
This implements the WIP wp-fractional-scale-v1 protocol.
2023-02-07linux-dmabuf-v1: fix missing SCANOUT flagSimon Ser
options->scanout_primary_output indicates an output on which scanout is desirable. Set the missing SCANOUT flag. Fixes: 0c966f102c1d ("linux-dmabuf-v1: add wlr_linux_dmabuf_feedback_v1_init_with_options()")
2023-02-06linux-dmabuf-v1: use wlr_linux_dmabuf_feedback_v1_init_with_options()Simon Ser
2023-02-06linux-dmabuf-v1: add wlr_linux_dmabuf_feedback_v1_init_with_options()Simon Ser
2023-02-06linux-dmabuf-v1: add basic helpers for feedbackSimon Ser
2023-02-06linux-dmabuf-v1: stop using const in feedbackSimon Ser
Instead of using const pointers, use structs owned by the tranche. This will allow wlroots to expose helpers to build feedback objects.
2023-02-06xdg-activation: accept pointer focus for new tokensConsolatis
This patch allows surfaces without keyboard focus but with pointer focus to receive valid tokens. This can be relevant for applications using an older version of the layershell protocol which only provided the choice between no keyboard focus and exclusive keyboard focus.
2023-02-04wlr_scene: Rename wlr_scene_surface_from_bufferAlexander Orzechowski
This renames it to wlr_scene_surface_try_from_buffer to be more clear that this function can return NULL. This is inline with the rest of wlroots[1]. [1] https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3991
2023-02-03layer-shell: forbid changing the existing popup parentKirill Primak
2023-02-03xwayland/shell: actually use wlr_xwayland_surface_v1.linkKirill Primak
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3575
2023-02-02render/gles2: default to highp if availableSimon Ser
The spec [1] says that the maximum value for a mediump float is at least 2¹⁴ in section 4.5.2. However, when using a 4k resolution texture coordinates will exceed this value. This causes issues on drivers which implement mediump as a 16-bit [2]. Switch to highp. There's a twist: on GLES2, support for highp is optional. So we need to guard it with cute GL_FRAGMENT_PRECISION_HIGH ifdefs. [1]: https://registry.khronos.org/OpenGL/specs/es/2.0/GLSL_ES_Specification_1.00.pdf [2]: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21082
2023-02-02render/gles2: use correct type for shader typeSimon Ser
Doesn't matter a lot, but let's try to be consistent with the GL headers.
2023-02-02backend/wayland: handle wl_registry.global_remove for wl_seatSimon Ser
Destroy the struct wlr_wl_seat when the global is removed.
2023-02-02backend/wayland: make destroy_wl_seats() handle a single seatSimon Ser
Instead of destroying all seats, destroy a single one. We only need to destroy all seats at one call-site (backend_destroy), but we'll need to destroy a single seat elsewhere in the next commit.
2023-02-02backend/drm: require hwdata pkg-config fileSimon Ser
The hardcoded fallback "/usr/share/hwdata/pnp.ids" was only a temporary solution to get things working while distributions were still working on shipping it.
2023-02-02ci: install hwdata-dev on AlpineSimon Ser
This gives us the pkg-config file.
2023-02-02backend/wayland: update output mode after commit is doneSimon Ser
Do not update the output mode if the commit failed in one of the error codepaths.
2023-02-02backend/wayland: allow superseding a previous commitSimon Ser
During a modeset, the core wlr_output logic will allocate a buffer with a new size and commit it. However if we still have a frame callback pending we'd refuse to perform the commit. This is inconsistent with the DRM backend, which performs a blocking modeset. This is visible when resizing the Wayland toplevel. The logs are filled with "Skipping buffer swap", and the wlr_damage_ring's bounds are not properly updated. Fix this by destroying the pending frame wl_callback.
2023-02-02output: don't attach buffer on first commit if disabledSimon Ser
In output_ensure_buffer() we create a swapchain and attach an empty buffer to the output if necessary. We do that during the first commit. This is fine when the first commit enables the output, however this breaks when the first commit disables the output. A commit which disables an output and has a buffer attached is invalid (see output_basic_test()), and makes the DRM backend crash: 00:00:00.780 [wlr] [backend/drm/drm.c:622] connector eDP-1: Turning off ../subprojects/wlroots/backend/drm/drm.c:652:44: runtime error: member access within null pointer of type 'struct wlr_drm_crtc' AddressSanitizer:DEADLYSIGNAL ================================================================= ==2524==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f22e894afc1 bp 0x7ffe1d57c550 sp 0x7ffe1d57c420 T0) ==2524==The signal is caused by a READ memory access. ==2524==Hint: address points to the zero page. #0 0x7f22e894afc1 in drm_connector_commit_state ../subprojects/wlroots/backend/drm/drm.c:652 #1 0x7f22e894b1f5 in drm_connector_commit ../subprojects/wlroots/backend/drm/drm.c:674 #2 0x7f22e89e8da9 in wlr_output_commit_state ../subprojects/wlroots/types/output/output.c:756 #3 0x555ab325624d in apply_output_config ../sway/config/output.c:517 #4 0x555ab31a1aa1 in handle_new_output ../sway/desktop/output.c:974 #5 0x7f22e9272f6d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x9f6d) #6 0x7f22e899b012 in new_output_reemit ../subprojects/wlroots/backend/multi/backend.c:161 #7 0x7f22e9272f6d in wl_signal_emit_mutable (/usr/lib/libwayland-server.so.0+0x9f6d) #8 0x7f22e895a153 in scan_drm_connectors ../subprojects/wlroots/backend/drm/drm.c:1488 #9 0x7f22e893c2e4 in backend_start ../subprojects/wlroots/backend/drm/backend.c:24 #10 0x7f22e892ed00 in wlr_backend_start ../subprojects/wlroots/backend/backend.c:56 #11 0x7f22e8999b83 in multi_backend_start ../subprojects/wlroots/backend/multi/backend.c:31 #12 0x7f22e892ed00 in wlr_backend_start ../subprojects/wlroots/backend/backend.c:56 #13 0x555ab317d5cc in server_start ../sway/server.c:316 #14 0x555ab317748d in main ../sway/main.c:400 #15 0x7f22e783c28f (/usr/lib/libc.so.6+0x2328f) #16 0x7f22e783c349 in __libc_start_main (/usr/lib/libc.so.6+0x23349) #17 0x555ab3134c84 in _start (/home/simon/src/sway/build/sway/sway+0x377c84) Fixes: 3be6658ee7b6 ("output: allocate swapchain on first commit") Closes: https://github.com/swaywm/sway/issues/7373