It's a necessary step to let kwin repaint the cursor from Compositor.
Unfortunately, it also means that we need to add more (temporary) code
to paint the cursor in backends.
Currently, output backends track the cursor behind the scenes. This
results in some amount of code duplication, for example the handling of
hidden cursors, every backend handles in its own unique way, some don't
do it correctly. Another issue is that output backend interact with
other components behind the back. This can be a problem for tasks such
as backing the cursor with an output layer.
This change introduces explicit output cursor manipulation APIs in the
Output class. There's a good chance that it's going to be revised more
in the future as part of streamlining output layer manipulation apis.
With the proposed changes, the workspace would need to call
Output::setCursor() or Output::moveCursor() to set/unset or move the
cursor, respectively.
At the moment, we rely on placeholder output getting created, but there
are cases where it's desired to spin kwin with virtual outputs so you
could take screenshots and things as such.
As explained in [1], WL_SURFACE_ID is racy because wayland aggressively
reuses object ids. The xwayland-shell-v1 protocol intends to fix that by
two things:
* associating a serial number with each X11 window. This is to avoid
potential XID reuse
* referring to the wayland surface by the wl_surface rather than
specifying an object id
Unfortunately, we will have to maintain both legacy WL_SURFACE_ID and
WL_SURFACE_SERIAL for quiet some time until most instances of Xwayland
support the xwayland-shell-v1 protocol [2].
[1] https://gitlab.freedesktop.org/xorg/xserver/-/issues/1157
[2] https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/163
The main motivation behind this change is to allow setting the cursor
per output, which eases up implementing things such as cursor output layers.
It also has another advantage - output related code is more
encapsulated. Furthermore, we could decouple output backends from Cursor.
We need to completely renegotiate stream parameters in case of window
size gets changed, otherwise no renegotiation will happen and clients
will not accommodate to our changes.
Fixes: https://github.com/obsproject/obs-studio/issues/7875
in a CI context the paths are mutable between installation and use
and as such the permission checks can just not ever work. for use
in such scenarios allow completely disabling the permission checks