Age | Commit message (Collapse) | Author |
|
|
|
Without EGL_EXT_device_drm, eglQueryDeviceStringEXT(EGL_DRM_DEVICE_FILE_EXT) further below is invalid.
|
|
For informational purposes.
|
|
If left unspecified, these defaults to the project name and version.
|
|
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()
|
|
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
|
|
|
|
This implements the WIP wp-fractional-scale-v1 protocol.
|
|
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()")
|
|
|
|
|
|
|
|
Instead of using const pointers, use structs owned by the tranche.
This will allow wlroots to expose helpers to build feedback
objects.
|
|
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.
|
|
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
|
|
|
|
Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3575
|
|
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
|
|
Doesn't matter a lot, but let's try to be consistent with the
GL headers.
|
|
Destroy the struct wlr_wl_seat when the global is removed.
|
|
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.
|
|
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.
|
|
This gives us the pkg-config file.
|
|
Do not update the output mode if the commit failed in one of the
error codepaths.
|
|
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.
|
|
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
|
|
Because wl_buffer.release is per-buffer and not per-commit, the
Wayland backend might create multiple struct wlr_wl_buffer per
struct wlr_buffer. As a result, the wlr_buffer_unlock() call inside
destroy_wl_buffer() can cause another struct wlr_wl_buffer to be
destroyed.
In backend_destroy() we were iterating the list of buffers with
wl_list_for_each_safe(), which is actually not safe in this case:
the next buffer is cached, but might be destroyed as a side-effect
of calling destroy_wl_buffer().
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3572
|
|
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
|
|
References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/884
|
|
The same X11 window can be used multiple times with a different
wl_surface.
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3570
|
|
This new function replaces wlr_surface_is_xwayland_surface() and
wlr_xwayland_surface_from_wlr_surface().
|
|
This leaves it up to wlr_xcursor_theme_load() to pick the theme
name.
|
|
"left_ptr" is the X11 name, "default" is the cursor spec name.
|
|
wlr_xcursor_get_resize_name() returns cursor-spec [1] based names
but the default cursor icons shipped in include/xcursor/cursor_data.h
use traditional X cursor names instead.
Compositors that use wlr_xcursor_get_resize_name() to resolve an edge
to a cursor icon name may thus be unable to render appropriate cursor
icons for users that don't have a cursor-spec compliant cursor theme
installed on their system or have it installed in an unusual place.
This patch adds cursor-spec cursor icon name aliases.
[1] https://www.freedesktop.org/wiki/Specifications/cursor-spec/
|
|
We made a similar change to wlr_xdg_toplevel.
|
|
This is more descriptive, and avoids the confusion with
wlr_xdg_surface.added.
|
|
We're at the end of the function anyways.
|
|
When a client attaches a NULL buffer to its wl_surface, it's
unmapped. This resets the xdg_surface in its initial state. An
extra NULL commit makes the compositor send an initial configure
event.
Note, wlr_xdg_toplevel.added is separate from wlr_xdg_surface.added.
Closes: https://github.com/swaywm/sway/issues/7397
|
|
Since 1d581656c756 ("backend/drm: set "max bpc" to the max") we
set the "max bpc" property to the maximum value. The kernel driver
is supposed to clamp this value depending on hardware capabilities.
All kernel drivers lower the value depending on the GPU capabilities.
However, none of the drivers lower the value depending on the DP-MST
link capabilities. Thus, enabling a 4k@60Hz mode can fail on some
DP-MST setups due to the "max bpc" property.
Additionally, it's not a good idea to unconditionally set "max bpc"
to the max. A high bpc consumes more lanes and more clock speed,
which means higher power consumption and the busy lanes cannot be
used for something else (e.g. other data transfers on a USB-C cable).
For now, let's tie the "max bpc" to the pixel format of the buffer.
Introduce a heuristic to make "high bit-depth buffer" a synonym of
"I want the best quality".
This is not perfect: a "max bpc" higher than 8 might be desirable
for pixel formats with a color depth of 8 bits, for instance when
the color management KMS properties are used. But we don't really
support that yet, so let's leave this for later.
Closes: https://github.com/swaywm/sway/issues/7367
|
|
|
|
|
|
|
|
|
|
We can just create a wl_array from the array passed by the user.
Here, wl_array is only necessary to make libwayland happy.
|
|
|
|
|