Otherwise the number of touch points goes up constantly and d'n'd via
touch can't work as validation always fails.
Fixes 75ecba44 ("seat: add serials to touch up events")
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Creating a renderer results in lots of logs. Make it clear that
the logs belong to a multi-GPU renderer (as opposed to a primary
renderer created by the compositor).
Replace them with pixman_region32_empty(), which avoids using a
double-negative when checking if a region is empty. Also use that
new function when checking for non-empty regions so that only one
variant of the Pixman API is used.
The old approach of using a signal is fundamentally broken for a common
usecase: When the waiter is ready, it's common to immediately finish and
free any resources associated with it.
Because of the semantics of wl_signal_emit_mutable() this is UB.
wl_signal_emit_mutable() always excepts that the waiter hasn't been freed
until the signal has finished being emitted.
Instead of over engineering the solution, let's just add a callback required
by wlr_drm_syncobj_timeline_waiter_init(). In this callback, the implementation
is free to finish() or free() any resource it likes.
This fixes a problem where an outdated surface input region was used to
compute the effective confinement region.
Additionally, this commit fixes a bug in pointer_constraint_create()
which caused the initial region to not be applied immediately.
This is a breaking change: set_region is now emitted before the role
commit hook is called, and it's not emitted if the region hasn't
actually changed.
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).