Commit graph

7746 commits

Author SHA1 Message Date
Simon Ser
43b37e34d6 render/vulkan: fix missing DMA-BUF implicit read fence for textures
When we're reading from a DMA-BUF texture using implicit sync, we
need to (1) wait for any writer to be done and (2) prevent any
writers from mutating the texture while we're still reading. We
were doing (1) but not (2).

Fix this by calling dmabuf_import_sync_file() with DMA_BUF_SYNC_READ
for all DMA-BUF textures we've used in the render pass.
2026-02-23 09:33:27 -05:00
Simon Ser
73bbad8433 render/vulkan: take render pass in vulkan_sync_render_buffer()
We'll need to grab textures from there in the next commit.

Also rename it to better reflect what it does: synchronize release
fences after a render pass has been submitted.
2026-02-23 09:33:27 -05:00
Simon Ser
a6e5807e86 render/vulkan: introduce buffer_import_sync_file()
Will be used in two spots in a following commit.
2026-02-23 09:33:27 -05:00
Simon Ser
7be5e3689c build: bump version to 0.20.0-rc3 2026-02-22 23:38:52 +01:00
hrdl
25bec59c75 CONTRIBUTING.md: update git host
gitlab.freedesktop.org -> ssh.gitlab.freedesktop.org
2026-02-20 00:31:06 +01:00
Kenny Levinsen
1efb216c6d backend/drm: Close non-master drm fd on failure
If we are not able to prepare the fd for non-master usage, close the fd
before returning an error.
2026-02-19 15:11:56 +00:00
Simon Ser
884d29e5f3 backend/libinput: guard against new enum entries
When libinput introduces new enum entries, we'd abort or send bogus
events to the compositor. Instead, log a message and ignore the
event.

Keep all enums without a default case so that the compiler warns
when we're missing a case.
2026-02-13 09:41:02 -05:00
Isaac Freund
25f94c5965
backend/x11: reject shm buffers with non-min strides
This fixes an X11 backend direct scanout bug with foot.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/4046
2026-02-13 11:56:08 +01:00
Simon Ser
910fd264fb build: bump version to 0.20.0-rc2 2026-02-12 22:47:22 +01:00
Aleksei Bavshin
3676ab4df0
backend/libinput: add support for LIBINPUT_SWITCH_KEYPAD_SLIDE 2026-02-08 11:01:06 -08:00
Aleksei Bavshin
c1452d8811
backend/libinput: fix build with libinput 1.31 2026-02-08 10:56:16 -08:00
Steve Williams
436bcf9a47 color-representation-v1: fix condition in surface commit 2026-02-07 08:36:29 +04:00
Steve Williams
ef88246642 types/wlr_buffer: add buffer_get_drm_format helper function 2026-02-06 13:53:46 +00:00
Steve Williams
bb78861ca9 color-representation: add support for identity+full 2026-02-06 13:53:46 +00:00
Steve Williams
439985fe95 color_representation: ensure encoding/range/drm formats compatibility 2026-02-06 13:53:46 +00:00
Steve Williams
4c81cb1b9e vulkan: make use of new pixel_format_is_ycbcr function 2026-02-06 13:53:46 +00:00
Steve Williams
19d6829601 render/pixel-format: add function to determine YCbCr from drm fourcc 2026-02-06 13:53:46 +00:00
YaoBing Xiao
dfccf5ff02 output/cursor: fix missing newline at end of file 2026-02-06 09:05:52 +00:00
rewine
bc11ac92ab
ext_image_capture_source_v1: remove unused variable 2026-02-06 10:41:42 +08:00
YaoBing Xiao
d362ed1eb9 xwayland: fix wl_array rollback when adding selection targets
Ensure mime_types and mime_types_atoms remain in sync when
wl_array_add() fails. Roll back the partially added entry and
free the allocated mime type to avoid leaks and inconsistent
state.
2026-02-05 09:26:55 +08:00
Simon Ser
90f9f59041 xwayland: try flushing immediately in xwm_schedule_flush()
wl_event_source_fd_update() goes through another event loop cycle, which
delays writes. This extra cycle was introduced in 6ada67da9b
("xwayland/xwm: implement somewhat asynchronous request flushing").

Try flushing the X11 WM FD immediately if we can.

References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/4044
2026-02-04 00:14:49 +01:00
rewine
7cb4e30bfd
wlr_cursor: fix event type in handle_tablet_tool_button 2026-02-03 21:25:50 +08:00
rewine
98196bbd89
wlr_cursor: add comments for signal parameters 2026-02-03 21:24:32 +08:00
rewine
4fe51aa439 types: Simplify wlr_keyboard_group_destroy
If the wlr_keyboard_group_remove_keyboard function is expanded, the code
is equivalent to:

```
	wl_list_for_each_safe(device, tmp_device, &group->devices, link) {
		struct wlr_keyboard_group *_group = group;
		struct wlr_keyboard *_keyboard = device->keyboard;
		struct keyboard_group_device *_device, *_tmp;
		wl_list_for_each_safe(_device, _tmp, &_group->devices, link) {
			if (_device->keyboard == _keyboard) {
				remove_keyboard_group_device(_device);
				continue;
			}
		}
	}
```

It's just running one more loop meaninglessly.
2026-02-02 10:46:20 -05:00
liupeng
12c9502edf render/drm_syncobj: fix function name in drmSyncobjTimelineWait() error log
Signed-off-by: liupeng <liupeng01@kylinos.cn>
2026-02-02 09:12:39 +08:00
liupeng
7f87e258b2 render/drm_syncobj: drop unnecessary drmSyncobjTimelineWait() arg
Signed-off-by: liupeng <liupeng01@kylinos.cn>
2026-02-02 09:11:41 +08:00
Simon Ser
4477ca7d32 build: bump version to 0.20.0-rc1 2026-02-01 21:13:18 +01:00
Simon Ser
d6c7a161c7 color_representation_v1: send chroma_location protocol error
This error has been added in:
46f46863b7
2026-02-01 20:09:45 +00:00
tokyo4j
82d5ffb09e ext-workspace-v1: add implementation
Co-authored-by: Consolatis <40171-Consolatis@users.noreply.gitlab.freedesktop.org>
2026-01-31 01:44:23 +09:00
Kenny Levinsen
5e32b6663b ext_image_copy_capture_v1: Only render scene source on damage
wlr_scene_output_needs_frame checks wlr_output.needs_frame and
wlr_scene_output.gamma_lut_changed, neither of which incur damage. The
needs_frame flag is often set by e.g., cursor movement.

For the purpose of a capture frame we are only interested in frames with
damage. Continue without damage causes session_handle_source_frame to
silently skip copying the frame, which causes the session to get stuck:
no ready or failed event is emitted, and frame_pending is still set so
no further output frame events will occur.

Only render in case there is damage, but send frame callbacks
regardless.
2026-01-24 22:49:40 +00:00
Félix Poisot
5a40da7e15 render: don't infer luminance multipliers from color TF
Make scene pass them explicitly instead. Ref #3995
2026-01-23 19:41:14 +00:00
Félix Poisot
68052f34d3 color_management_v1: new enum value for 'srgb' transfer function
ref https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/442
2026-01-23 18:50:09 +00:00
Félix Poisot
bb882e97f1 color_management_v1: use 64bit image description identities
ref https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/385
2026-01-23 18:50:09 +00:00
Félix Poisot
58f0867c04 color_management_v1: relax restrictions on maxCLL and maxFALL
ref https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/428
2026-01-23 18:50:09 +00:00
Félix Poisot
e6ddb6cdd3 meson: bump minimum wayland-protocols version
1.47 brings updates to color-management
2026-01-23 18:50:09 +00:00
Kenny Levinsen
5661ac1cd2 output-swapchain-manager: Reject zero resolution
If an output with no mode and no valid pending resolution is attempted
enabled, it will trigger an assert in swapchain allocation instead of
failing on a rejected atomic commit or pre-commit test.

We can sometimes get such broken outputs if e.g., the underlying driver
failed to retrieve EDID, and so crashing on assert is suboptimal.

Reject zero-sized swapchains early and log the issue.
2026-01-22 12:55:13 +01:00
xurui
91c08d5a53 xwayland/selection/dnd: fix parameter type
Signed-off-by: xurui <xurui@kylinos.cn>
2026-01-20 16:39:08 +08:00
Jens Peters
3eb07b1fdb backend/libinput: expose libinput_tablet_tool
Exposing libinput_tablet_tool from libinput allows compositors
to set tool specific configuration options like pressure range
and eraser button behavior.

See 'libinput_tablet_tool_*()' functions which require a
'libinput_tablet_tool' handle:
https://wayland.freedesktop.org/libinput/doc/1.30.0/api/group__config.html
(libinput 1.30.0, latest at the time of writing).
2026-01-19 20:45:39 +01:00
Stephane Fontaine
b7312b4f95 xwm: don't leak msg in case of realloc failure 2026-01-18 17:42:25 +04:00
Isaac Freund
f735439543
xwayland: add set_size_hints signal
Currently there is no way for the compositor to be notified when an
Xwayland client sets/modifies its size hints.
2026-01-15 11:49:49 +01:00
Robin Ebert
ba76d37b0b
wlr_ext_image_copy_capture_v1: Fix segmentation fault when using cursor session
Fixes: 3b9f599cbe
2026-01-12 12:40:34 +01:00
Alexander Orzechowski
1f0fb95e3b wlr_scene: Add documentation to scene_node_update() 2026-01-08 13:03:46 -05:00
Alexander Orzechowski
ed7b633669 wlr_scene: Only do disable cleanup when explicit damage is given
We don't want to iterate the subtree for trivial update scenarios. We only
care when a scene is reparented or disabled in which both cases provides
us with explicit damage
2026-01-08 13:03:46 -05:00
Alexander Orzechowski
ef19f52ca9 wlr_scene: Update outputs when node is disabled 2026-01-08 13:03:46 -05:00
Alexander Orzechowski
56eb27ab0b wlr_scene: Don't recurse when disabling scene node if a child is already disabled
If a child is disabled, that means the node already went through the
rigamarole of cleaning up its state. Don't do it again.
2026-01-08 13:03:46 -05:00
Alexander Orzechowski
edc12e81d9 wlr_scene: Make restack_xwayland_surface_below generic
more stuff will be put here
2026-01-08 13:03:46 -05:00
Peter Kaplan
49576469ec image_capture_source: wlr_output_try_from_ext_image_capture_source_v1() 2026-01-07 09:18:25 +01:00
Peter Kaplan
3b9f599cbe wlr_ext_image_copy_capture_v1: new_session event
And a destroy event in wlr_ext_image_copy_capture_session_v1.
2026-01-07 09:18:25 +01:00
Simon Ser
368dcfb9f6 ext_image_capture_source_v1: wait for capture client before sending frame event
We were sending an output frame event as soon as we were done
rendering. As a result, the output would render in a busy loop when
a client was using the capture output for frame pacing purposes.

Instead, use the request_frame hook introduced in the previous
commit to throttle output frame events.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/4036
2026-01-05 15:03:18 -05:00
Simon Ser
f93865ed1f ext_image_copy_capture_v1: replace schedule_frame with request_frame
schedule_frame is only called when the client has submitted damage
and a new frame should be rendered immediately. schedule_frame is
not called when the capture client is waiting for the next frame
but hasn't submitted damage.

Sources implementing a rendering loop based on the capture rate
need to know when a capture client is ready to accept a new frame.
Such sources want to trigger a redraw if and only if (1) they are
dirty (their contents have changed) and (2) the capture client is
ready to accept a new frame.

Replace schedule_frame with request_frame, triggered each time a
client sends a capture request. A flag indicates whether the capture
client has submitted damage.
2026-01-05 15:03:18 -05:00