Commit graph

7771 commits

Author SHA1 Message Date
Félix Poisot
8daba3246d scene: transfer sample syncobj to client timeline
(cherry picked from commit b2f6a390a4)
2026-03-19 20:01:40 +01:00
Félix Poisot
52564ea97c linux_drm_syncobj_v1: add release point accumulation
This changes the behavior of wlr_linux_drm_syncobj_surface_v1 to
automatically signal release of previous commits as they are replaced.

Users must call wlr_linux_drm_syncobj_v1_state_add_release_point or
wlr_linux_drm_syncobj_v1_state_signal_release_with_buffer to delay the
signal as appropriate.

(cherry picked from commit bfd6e619fc)
2026-03-19 20:01:40 +01:00
Félix Poisot
288ba9e75b drm/syncobj: add timeline point merger utility
(cherry picked from commit e83a679e23)
2026-03-19 20:01:40 +01:00
Félix Poisot
2f14845ce0 scene: add buffer release point to 'sample' event
(cherry picked from commit 1f3d351abb)
2026-03-19 20:01:23 +01:00
Félix Poisot
c4ff394f7f render/drm_syncobj: add wlr_drm_syncobj_timeline_signal()
(cherry picked from commit 0af9b9d003)
2026-03-19 19:48:36 +01:00
Isaac Freund
88718e84c9 virtual-keyboard: handle seat destroy
We must make the virtual keyboard inert when the seat is destroyed.

(cherry picked from commit 1fa8bb8f7a)
2026-03-19 19:48:14 +01:00
Isaac Freund
6a902237ef virtual-keyboard: add wlr_virtual_keyboard_v1_from_resource()
I want to use the zwp_virtual_keyboard_v1 object in a custom river
protocol and need to be able to obtain the corresponding wlroots struct.

(cherry picked from commit ec746d3e3e)
2026-03-19 19:48:14 +01:00
Scott Moreau
47a43e14ae wlr_ext_image_copy_capture_v1: Fix crash when client creates a cursor session not implemented server side
This guards against a crash where the server implements
wlr_ext_image_capture_source_v1_interface without setting .get_pointer_cursor().
In general, we should install a NULL check here because this is a crash
waiting to happen. Now, instead of crashing, the resource will be created and
the copy capture session will be stopped.

(cherry picked from commit 1fc928d528)
2026-03-19 19:48:09 +01:00
llyyr
ba32abbddb scene: use wl_list_for_each_safe to iterate outputs
The outputs loop in handle_scene_buffer_outputs_update may remove entries
from the list while iterating, so use wl_list_for_each_safe instead of
wl_list_for_each.

Fixes: 39e918edc8 ("scene: avoid redundant wl_surface.enter/leave events")
(cherry picked from commit 3cb2cf9425)
2026-03-19 19:48:05 +01:00
Isaac Freund
9c3bfbeb48 scene: avoid redundant wl_surface.enter/leave events
Currently we send wl_surface.enter/leave when a surface is hidden
and shown again on the same output. In practice, this happens very
often since compositors like river and sway enable and disable
the scene nodes of surfaces as part of their atomic transaction
strategy involving rendering saved buffers while waiting for
clients to submit new buffers of the desired size.

The new strategy documented in the new comments avoids sending
redundant events in this case.

(cherry picked from commit 39e918edc8)
2026-03-19 19:47:55 +01:00
Diego Viola
b727521449 wlr-export-dmabuf-unstable-v1: fix typo
(cherry picked from commit 736c0f3f25)
2026-03-19 19:47:55 +01:00
Jonathan Marler
af228b879a backend/x11: ignore DestroyNotify events
The X11 backend subscribes to StructureNotify events, so when
output_destroy() calls xcb_destroy_window() the server sends a
DestroyNotify back. This is expected and harmless but was logged
as an unhandled event. Silence it the same way MAP_NOTIFY and
UNMAP_NOTIFY are already silenced.

(cherry picked from commit 3c8d199ec1)
2026-03-19 19:47:55 +01:00
Kenny Levinsen
ec26eb250a util/box: Use integer min/max for intersection
wlr_box_intersection only operates on integers, so we shouldn't use
fmin/fmax. Do the usual and add a local integer min/max helper.

(cherry picked from commit 285cee5f3a)
2026-03-19 19:47:55 +01:00
Christopher Snowhill
3105ac2b16 scene: fix color format compare
bool doesn't really support negative values.

Fixes: 7cb3393e7 (scene: send color_management_v1 surface feedback)
(cherry picked from commit 9a931d9ffa)
2026-03-19 19:47:55 +01:00
Simon Zeni
557fde4d01 ci: update dalligi upstream repo
(cherry picked from commit 67ce318b1f)
2026-03-19 19:47:55 +01:00
Andri Yngvason
e444836bf2 image_capture_source/output: Update constraints on enable
Without observing the enable event, clients receive no pixel formats and
buffer dimensions are reported as 0 after an output has been re-enabled.

(cherry picked from commit 3336d28813)
2026-03-19 19:47:55 +01:00
Simon Ser
2d39166146 build: bump version to 0.20.0-rc4 2026-03-05 19:54:06 +01:00
liupeng
1b8c3ea8c5 screencopy: simplify capture error handling
Signed-off-by: liupeng <liupeng01@kylinos.cn>
2026-03-04 21:09:47 +08:00
YaoBing Xiao
55bb69e2c4 render/gles: use optimized clears for unblended rects 2026-03-03 11:02:08 +00:00
Wang Yu
a55b85e2e1 xwayland: fix memory leak on pipe() failure
When pipe() fails in xwm_selection_send_data(), the function
returns without cleaning up the allocated transfer structure
and initialized wl_array. This causes a memory leak.

Add wl_array_release() and free() to clean up resources when
pipe() fails.

Signed-off-by: Wang Yu <wangyu@uniontech.com>
2026-03-03 14:37:42 +08:00
Diego Viola
6d9aa17572 treewide: fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2026-02-28 04:26:47 -03:00
Kenny Levinsen
1ce992d7cb scene/layer_shell_v1: Add support for exclusive_edge
The v5 layer shell interface allows the client to specify which edge the
exclusive zone will apply to, instead of deducing it from the anchor
points. Add support for this to the layer shell scene helper.
2026-02-24 13:28:46 +00:00
Simon Ser
2367d78c3c render/vulkan: fix missing DMA-BUF implicit write fence for render buffer
Same as previous commit for the read side, but this one waits for
all readers to be done before starting to write.
2026-02-23 09:33:27 -05:00
Simon Ser
8c8d6363a1 render/vulkan: add "acquire" to vulkan_sync_foreign_texture()
Makes it more obvious that this is about the acquire side, not the
release side.
2026-02-23 09:33:27 -05:00
Simon Ser
ff4ce12179 render/vulkan: introduce buffer_export_sync_file()
Same as buffer_import_sync_file(), but for the export side.
2026-02-23 09:33:27 -05:00
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