Commit Graph

7210 Commits

Author SHA1 Message Date
Simon Ser
dc5996a8b4 seat/keyboard: drop unnecessary check in handle_keyboard_keymap()
This condition always holds true: the listener is set up for
state->keyboard.
2024-05-27 23:08:20 +00:00
Violet Purcell
c76a232835 tinywl: update for versioned pkg-config file 2024-05-27 22:15:00 +00:00
Violet Purcell
4b4f76cc13 Version pkgconfig, headers, and library for parallel installation
Since wlroots almost always significantly breaks API each minor release,
allowing parallel installation of wlroots helps packagers deal with
programs that require conflicting versions of wlroots.

Closes: #3786
2024-05-27 22:15:00 +00:00
Kirill Primak
08c64c166f backend/x11: send correct keyboard layout 2024-05-26 12:52:42 +00:00
Simon Ser
8cd58bc53c render/allocator: document struct wlr_allocator 2024-05-25 13:28:19 +00:00
Kenny Levinsen
f409fcc772 editorconfig: Unset maximum line length for .git
An editorconfig's asterix section applies to the whole file tree,
including the .git folder. The Git commit message dialog is a temporary
file named .git/COMMIT_EDITMSG, which the editorconfig applies to.

To avoid having the line length of commit messages changed to 100 chars,
add a rule to specifically unset the max_line_length for the .git
folder.
2024-05-25 07:54:58 +00:00
Kenny Levinsen
13b9b54f3f wlr_scene: Skip direct scanout on color transform
If we need to apply a color transform to rendered content, we will not
be able to use direct scanout. Explicitly skip it to not accidentally
show frames lacking the color transform.
2024-05-24 17:24:32 +02:00
David Turner
34201b0e7f render/pixman: Fix non-uniform scale with rotation
e08d52bb introduced a bug when rotating by 90 or 270 degrees and doing
non-uniform scaling (different scale factor on X and Y axes).  The scale
factor was calculated as the ratio between the src box and the rotated
dst box.  But scaling is applied after rotation, so the scale factor
should instead be the ratio between rotated src box and dst box.
2024-05-23 11:56:59 +00:00
David Turner
d7f63ab76c render/pixman: Remove half-pixel shift
Reverts 77006e5565.  It turns out this
change really breaks the labwc drop-shadow implementation (which relies
on scaling up single-pixel-wide buffers).

After reverting this there's still something subtley wrong with scaling
pixel locations (shown by `weston-scaler -b`) but I can't see an obvious
way to make both weston-scaler and labwc drop-shadows work in the same
way with pixman and gles2. I'll have a harder look at this but in the
mean time reverting this patch seems to make things less broken on
average.
2024-05-23 11:56:59 +00:00
JiDe Zhang
36c0d5fe3a output: reset hardware_cursor on failure
The DRM backend's set_cursor function always return true if the
buffer is NULL. If using a NULL cursor's buffer on startup, the
wlr_output_cursor will be marked as a hardware cursor. If the
cursor later gains a non-NULL buffer and the DRM backend rejects
that buffer, the cursor will remain marked as a hardware cursor,
despite the backend not displaying it as such. As a result, the
cursor will not be displayed at all. Fix this by always resetting
the hardware_cursor field in output_cursor_attempt_hardware().
2024-05-23 09:32:16 +02:00
nerdopolis
35c3194ae5 backend/libinput: Fix call of handle_libinput_readable() when WLR_LIBINPUT_NO_DEVICES is set 2024-05-21 08:26:04 -04:00
Simon Zeni
325d843814 backend/x11: don't exit on dri3 DRM FD query failure
Even if the backend advertises dri3 support, querying the DRM FD may fail.
Instead of returning early, the backend creation process must continue because
shm might be supported.
2024-05-15 17:54:58 +00:00
Isaac Freund
6219d7b819
wlr_surface: update get_root_surface() docs
Since destroying a wlr_surface now makes all subsurfaces inert, this
function can no longer fail and return NULL. Document this.
2024-05-15 15:54:38 +02:00
Simon Ser
2c4d3ad12d render/vulkan: don't use UNDEFINED layout for imported DMA-BUFs
UNDEFINED when used as source layout means that the contents of
the underlying memory becomes undefined. This isn't what we want
here: we don't want to mutate the imported pixel data.

The Vulkan spec isn't really clear what the proper value should be
here, but after discussing with driver developers [1] it seems like
UNDEFINED isn't the right one. The recommendation is to use GENERAL
instead.

[1]: https://github.com/ValveSoftware/gamescope/issues/356
2024-05-14 13:14:28 +02:00
Alexander Orzechowski
56ebfde540 docs: Add notes about WLR_SCENE_DISABLE_VISIBILITY effectively disabling direct scanout. 2024-05-11 11:59:36 -04:00
Kirill Primak
f0b7fb72a8 render/vulkan: don't free a descriptor set from an already destroyed lut3d dummy pool 2024-05-09 19:07:54 +03:00
Kirill Primak
073c3e8837 render/vulkan: free render format setups on destroy 2024-05-09 18:47:02 +03:00
Kirill Primak
e20ae113f8 render/vulkan: free pipeline layouts on destroy 2024-05-09 18:46:55 +03:00
Kirill Primak
00bc75439f render/vulkan: fix texture clip region leak 2024-05-09 18:40:31 +03:00
Kirill Primak
510664e79b output: disable hardware cursor when falling back to software 2024-05-07 14:47:05 +00:00
Kirill Primak
f534434be6 output: extract hardware cursor disabling logic 2024-05-07 14:47:05 +00:00
Kirill Primak
9c50cd71b6 xdg-toplevel: allow edge_none for resizing 2024-05-07 09:45:58 +03:00
groveer
293b0aa502 wlr_pointer_gestures_v1: emit destroy signal in destroy function 2024-05-06 10:47:33 +03:00
groveer
dead0ebcc8 wlr_pointer_gestures_v1: init destroy signal 2024-05-06 10:46:42 +03:00
Alexander Orzechowski
53be443f39 wlr_scene: Add WLR_SCENE_HIGHLIGHT_TRANSPARENT_REGION env 2024-05-05 02:22:50 +03:00
Kirill Primak
8fdf9dc4f0 scene: fix double scaling of opaque region for blend mode optimization 2024-05-05 01:54:59 +03:00
Kirill Primak
341154a5f6 alpha-modifier-v1: add a missing NULL check in wlr_alpha_modifier_v1_get_surface_state() 2024-05-01 03:07:16 +03:00
Simon Ser
027d453f6a scene/surface: add support for alpha-modifier-v1 2024-04-30 17:49:34 +02:00
Simon Ser
563f100627 alpha-modifier-v1: new protocol implementation
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/287
2024-04-30 17:49:34 +02:00
Consolatis
8abd43803b xwayland: remove saved_{width,height}
This has been introduced way back in
be297d9d14 but is never used anywhere.

If compositors want to save the old dimensions before reacting to a
fullscreen or maximize event they can just grab the sizes within their
event handlers instead.
2024-04-30 15:24:40 +00:00
Simon Ser
b22bb921d3 ci: convert last remnant from "meson setup" migration
We missed one.

Fixes: 254c5fc752 ("Switch to "meson setup"")
2024-04-30 17:21:14 +02:00
Simon Ser
aa340ade65 render/color: split off lcms2 code
Fixes compilation with color management disabled.
2024-04-30 16:56:03 +02:00
David Turner
77006e5565 render/pixman: half-pixel shift to match GPUs
Add a half-pixel shift in the pixman renderer to match the results given
by GPU-based renderers when scaling.
2024-04-30 14:02:21 +00:00
David Turner
e08d52bbc6 render/pixman: Improve transform performance
The old code to render transformed textures with pixman would run
composite over the whole output regardless of the texture size.  When
rendering something small this caused a huge performance hit.

Rewrite the transform branch of render_pass_add_texture to:
- Only composite over the rectangle we're drawing to
- Generally try to make things a lot clearer and some comments

Fixes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3832
2024-04-30 14:02:21 +00:00
Kenny Levinsen
be667b0628 backend/drm: Free drm device name on error 2024-04-30 10:18:05 +02:00
Simon Ser
3aef433f97 backend/drm: handle errors when fetching DRM name/version
These functions can fail if the FD is not a DRM device or on
memory allocation failure, for instance.
2024-04-30 09:57:28 +02:00
Manuel Stoeckl
82b4bc3f5f renderer: add field to indicate color transform support 2024-04-26 17:17:36 +00:00
Manuel Stoeckl
391410deb5 wlr_scene: add color transform argument for rendering 2024-04-26 17:17:36 +00:00
Manuel Stoeckl
ffdbfdbbbd render/vulkan: add support for output color transforms 2024-04-26 17:17:36 +00:00
Manuel Stoeckl
e443434876 render/vulkan: create plain framebuffers on demand
This change makes it possible to support both the direct srgb-format
pipeline and indirect (color-managed, or non-srgb-format) pipeline
for the same render buffer.
2024-04-26 17:17:36 +00:00
Manuel Stoeckl
adbfd3c321 render/vulkan: add lut3d output shader option
While a corresponding pipeline is created, it is not yet used.
2024-04-26 17:17:36 +00:00
Manuel Stoeckl
c64144a39b render/vulkan: add dummy 3d lookup table to output shader
Later commits will add shader options that use a real 3d
lookup table.
2024-04-26 17:17:36 +00:00
Simon Ser
895e3d18b9 render/color: introduce wlr_color_transform
Co-authored-by: Manuel Stoeckl <code@mstoeckl.com>
2024-04-26 17:17:36 +00:00
David Turner
ee0007c0f2 render/pixman: Fix source crop
Fix source crop in the pixman render backend.  It was being applied by
using a source offset as arguments to pixman_image_composite32().  But
this is wrong because the source crop should get applied before all the
other transforms, not after them (or at least this is how it works in
the other wlroots render backends).  Instead, apply the source crop as
yet another matrix transform when we're doing transforms (Or keep it the
same as previously if there's no other transforming going on).

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3830
2024-04-26 16:12:38 +00:00
David Turner
061b996768 render/pixman: fix flipped transforms
The translations for flipped offsets were set the same as non-flipped
ones which was totally wrong and meant that any textures with
flipped-transforms rendered entirely outside the viewport and were
basically invisible.
2024-04-26 16:12:38 +00:00
Alexander Orzechowski
41fd552f53 wlr_scene: Set wlr_damage_ring_set_bounds earlier
Fixes the _HIGHLIGHT option not highlighting the buffer correctly after
a resize
2024-04-24 12:58:17 -04:00
Alexander Orzechowski
1dc44a1afe wlr_scene: Schedule new frame for WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT in output commit handler
We were doing it too early before and the output would disregard a
scheduled frame if called when we were first putting together the output
state
2024-04-24 12:58:17 -04:00
Alexander Orzechowski
14692a7c55 wlr_scene: Fix WLR_SCENE_DEBUG_DAMAGE_HIGHLIGHT output damage 2024-04-24 12:58:17 -04:00
Consolatis
e70afebfc9 scene: do not reset scene_buffer state on buffer release
This fixes an issue with some buffers not rendering anymore due
to buffer_width and buffer_height being reset on buffer release.
2024-04-23 19:37:28 +02:00
Simon Ser
ebef710746 renderer: replace get_render_buffer_caps() with struct field 2024-04-22 11:38:30 +02:00