It is enough to get the global cursor location when repainting it. So we do not
need to query the relative position. If later on we find this is not right we
should be still able to get the relative position from the surface position
instead of calling into XWayland.
Also it is not expected and apparently unnecessary to move the cursor in the
paint function. Therefore remove this call too.
With cursor position going through global variables we do not need to query the
global position anymore. Remove the MouseCursor function for that.
Furtheron the relative position getter is also not necessary, but let's remove
this one in a separate commit.
This commit also adds a debug line for debugging flaky focus changing.
For now just mark one repaint per refresh interval without any particular
alignment, as that can be hard to get in nested. We'll use the display
timing extensions for that later.
We'll have it align properly in embedded mode soon.
- Add a commit wait thread that just waits for the work associated with
an in-bound dma-buff is done. We'd like to be getting a fence directly
from Wayland, but in the absence of that we'll make our own by tapping
into implicit-sync, DX11-style. gpuvis logging of the outcome of the
waits in the thread are consistent with the end of GPU work.
- Rework wayland commit handoff between wlserver and steamcompmgr to let
steamcompmgr have full access to the commit queue, letting it remove
elements in the middle and still keep going, compared to the previous
interface. This lets steamcompmgr get one commit per window per loop,
for now. We should be able to kick off waits and ref/unref resources
for all pending commits soon, with some work on the accounting first.
This should also fix an issue introduced recently where the overlay
could get really starved in embedded mode, as we were just getting
the first commit in the queue for a single frame.