Doesn't fully support multiple xwaylands or have all the infrastructure for that yet. This just splits the globals out for now and passes the ctx around.
Absorb 5 moves for auto-hide purposes instead of 3. Our nudge is 2 moves,
and we can warp on top of that, so we weren't counting everything.
Hide before changing mouse input focus and the warp that ensues.
Re-arm warp count when changing mouse input focus, so doing it repeatedly
with the same window doesn't eventually unhide despite no input.
In file included from ../src/steamcompmgr.cpp:74:
src/steamcompmgr.hpp:75:7: warning: private field 'm_hasPlane' is not used [-Wunused-private-field]
bool m_hasPlane;
^
wlroots headers can mostly be included with extern "C" blocks. Two
exceptions are the use of `static` for array args and `class` as a
struct field. These can be #define'ed to avoid C++ build errors.
This allows the whole project to be built as a single C++ codebase,
without having to maintain hybrid header files.
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.