This is unreliable because this is first come, first served: the
first capture stream decides whether or not cursors will be
included. Moreover, if the output lacks hw cursor support, cursors
will always be included. But it's the best we're going to get with
automatic wlr_output sources (and has bug parity with
wlr-screencopy-unstable-v1).
Up until now only the DRM backend required an output commit after
updating the cursor. Unify this for all backends, because:
- Screen capture can now catch cursor updates listening for output
commits
- In the future we want to make the cursor a regular wlr_output_layer,
which would need an output commit to be updated anyways
It makes sense to use udmabuf when the backend wants shm, the
renderer wants DMA-BUFs, and we don't have a DRM FD because we're
running with a software renderer (e.g. llvmpipe or lavapipe).
udmabuf can create a DMA-BUF backed by a memfd. This is useful
when running with a software implementation of GL/Vulkan: the memfd
can be passed to the parent compositor via wl_shm and the DMA-BUF
can be imported via the usual APIs into GL/Vulkan.
Add Meson wrap manifests for all of our dependencies which can
fallback to a subproject. This makes it easier to build wlroots
on platforms where system packages are outdated. Users can now
opt-in via `meson configure --wrap-mode=default` and Meson will
download and build any missing dependency.
Don't download by default because this can be quite surprising and
undesirable for some users (e.g. if they are just missing some -dev
package).
We'd print "cursor texture size exceeds hardware limitations" when
some hardware doesn't support cursors at all. Change the message
to better indicate the cause.
As struct wlr_drag is destroyed on drop and in the process resets
the focus, a xwayland dnd listener would also reset xwm->drag_focus.
This prevents the xcb replies from being processed and also prevents
the transfer if a compositor would not additionally request new focus
in its wlr_drag destroy handler (which is something usually only done
when in a focus-follows-mouse setting).
This patch creates a new xwm->drop_focus pointer which is a copy of
xwm->drag_focus at drop time. The xcb reply handler and transfer
logic now use the new xwm->drop_focus for their authorization checks.
The wlr_drag takes care of resetting the focused wlr_surface when
it's destroyed, however we store the wlr_xwayland_surface, which
may be destroyed before.
Fixes on-screen corruption when displaying a fullscreen client
with an implicit modifier on the secondary GPU.
What happens here:
- Client allocates a buffer with an INVALID modifier on primary GPU.
- Compositor attempts to scan-out this buffer on an output connected
to secondary GPU.
- Buffer is imported to secondary GPU, and is interpreted as if it had
the secondary GPU's implicit tiling, even though it has the primary
GPU's implicit tiling.
We need to forbid cross-device imports with implicit modifiers.
The mgpu_formats list is stripped from any INVALID modifier so
checking that fixes the bug.
Using the mgpu_formats list has an additional benefit: the buffer
is rejected in the test commit if it doesn't have a format supported
by the multi-GPU renderer.
Requires this Mesa bugfix:
https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31725