Commit graph

3186 commits

Author SHA1 Message Date
Félix Poisot
df1539d9f0 output/drm: don't use OUT_FENCE_PTR
The returned fence is not required to be signalled at the earliest
possible time. It is not intended to replace the drm flip event, and is
expected to be signalled only much later

(cherry picked from commit 8d454e1e34)
2026-03-19 20:01:40 +01:00
Félix Poisot
eff5aa52e6 backend/drm: properly delay syncobj signalling
DRM CRTC signals when scanout begins, but
wlr_output_state_set_signal_timeline() is defined to signal buffer
release. Delay to the next page flip

(cherry picked from commit cd555f9261)
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
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
6d9aa17572 treewide: fix typos
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2026-02-28 04:26:47 -03: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
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
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
Aleksei Bavshin
3676ab4df0
backend/libinput: add support for LIBINPUT_SWITCH_KEYPAD_SLIDE 2026-02-08 11:01:06 -08:00
Steve Williams
ef88246642 types/wlr_buffer: add buffer_get_drm_format helper function 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
rewine
98196bbd89
wlr_cursor: add comments for signal parameters 2026-02-03 21:24:32 +08: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
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
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
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
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
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
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
Simon Ser
84d603acc0 xwayland: take wlr_buffer in wlr_xwayland_set_cursor() 2026-01-05 10:10:32 -05:00
Simon Ser
d7f7b68f49 xcursor: introduce wlr_xcursor_image_get_buffer()
This makes it so callers no longer need to juggle with raw pixel
pointers anymore, and only need a single wlr_buffer-based codepath.

Additionally, cursors can be unloaded without risking use-after-free.
2026-01-05 10:10:32 -05:00
Simon Ser
2c64b30a67 scene: add knob to turn off Xwayland surface restacking
This is useful in these cases:

- The same surface is added to two different scene-graphs. wlroots
  can't figure out on its own which scene-graph should drive the
  Xwayland stacking.
- A compositor uses multiple Xwayland servers (e.g. one per app).
  wlroots will try to restack surfaces from different Xwayland
  instances and this will not go well.
2026-01-04 16:02:52 +00:00
Simon Ser
b094f8aeb3 scene/surface: don't cache frame pacing output
Storing the frame pacing output in a per-scene and per-surface
struct doesn't play well with multiple scenes. outputs_update is
only triggered for outputs the scene knows about, but operates on
all outputs the surface has entered regardless of the scene. Thus
leaving an output on one scene will not refresh the frame pacing
output on other scenes, and these other scenes will operate with
a stale frame pacing output. The surface will not receive any more
wl_surface.frame done events.

This also avoids keeping a dangling pointer around when the frame
pacing output is destroyed but the output isn't added in the scene.

References: https://github.com/swaywm/sway/issues/8885
2026-01-04 14:40:18 +01:00
Félix Poisot
32d5fc1d11 render/color: introduce color_transform_compose
It flattens color transform pipelines, and facilitates building
pipelines of variable content
2025-12-18 14:58:28 +00:00
Simon Ser
9b4d9eabb1 color_management_v1: add helpers to get supported TFs/primaries
This avoids hardcoding lists of TFs/primaries in compositors.

I've considered adding wlr_color_manager_v1_create_with_renderer()
instead, but I'm worried that some aspects of the options struct
don't really depend on the renderer, but on the compositor. Such
things are features and render intents.

I've considered returning a const array, but this would tie our
hands if we want to make the renderer advertise the set of
TFs/primaries it supports, instead of having a single flag gating
all of them.
2025-12-15 11:07:26 -05:00
tokyo4j
ba931024a5 Add wlr_version_get_{major,minor,micro}()
Can be used to detect wlroots version at runtime rather than
compile-time.
2025-12-13 11:06:28 +00:00
Ilia Bozhinov
0e9c6ddefa seat: add wlr_seat_touch_notify_clear_focus
This is needed for cases where the touch operation goes over a region
where no surfaces are present. In this case, we'd want to notify the
touch grabs (for example DnD grabs) that no focus is currently focused.
2025-12-11 21:10:59 +00:00
Félix Poisot
a962d58727 render/color: make wlr_color_primaries_from_named public 2025-12-05 19:14:49 +00:00
Félix Poisot
811765ffa0 output: don't rebuild cursor color transform for each update 2025-11-24 23:26:14 +00:00
Félix Poisot
7101a69804 scene: don't rebuild color transforms each frame 2025-11-24 23:26:14 +00:00
Félix Poisot
3d3d5fb1b7 render: remove buffer primaries from pass options
colorspace conversion is now carried explicitely by setting a
wlr_color_transform_matrix in the color transform
2025-11-24 23:26:14 +00:00
Félix Poisot
2cac711e55 render/vulkan: apply "matrix" color transforms in shader 2025-11-24 23:26:14 +00:00
Simon Ser
2995f31102 render/color: introduce wlr_color_transform_matrix
This is useful to perform color space conversions.
2025-11-24 23:26:14 +00:00
Félix Poisot
17f3f28865 render/color: add wlr_color_primaries_transform_absolute_colorimetric 2025-11-24 23:26:14 +00:00
Félix Poisot
b98904705d render/vulkan: fix single-pass linear path
Fixes d1c88e9 "render/vulkan: add linear single-subpass"

`find_or_create_render_setup` still assumed a single-buffer setup
always implied use of an srgb format
2025-11-23 10:30:51 +00:00
Simon Ser
fa7b66bcf4 color_representation_v1: add helper to create global from renderer 2025-11-13 10:35:56 -05:00
Simon Ser
2fbc0b5ac1 scene: add support for color encoding and range 2025-11-13 10:35:56 -05:00
Simon Ser
e8f9e9eea6 color_representation_v1: make supported_alpha_modes const 2025-11-13 10:35:56 -05:00
Simon Ser
fecaf6d1e8 render/vulkan: add suport for color encoding and range 2025-11-13 10:35:56 -05:00
Simon Ser
2a87ec8a35 render: add color encoding and range to wlr_render_texture_options 2025-11-13 10:35:56 -05:00
Simon Ser
378a491823 render/color: turn enum wlr_color_encoding into a bitfield
This will allow us to describe the set of supported encodings as
a bitfield.
2025-11-13 10:35:56 -05:00
Félix Poisot
8f7d763ad1 drm: save edid color characteristics in wlr_output 2025-11-06 10:29:12 +00:00