Commit Graph

7 Commits

Author SHA1 Message Date
Quantum
9db3cd7b51 [client] wayland: avoid protocol error when warping in capture mode
When using locked pointer (i.e. capture mode), it doesn't make sense to
warp the cursor, so we disable it. This fixes #540.
2021-05-22 13:22:31 +10:00
Quantum
0f2fd84724 [client] ds: avoid util_cursorToInt when warping pointer
Using util_cursorToInt messes with the error tracking for normal movements,
and is not necessary since we are computing an absolute position on the
client window.

Instead, we should pass doubles directly to display servers and let them
decide how to best handle them. For example, XIWarpPointer accepts doubles
directly.
2021-05-04 19:02:13 +10:00
Quantum
71c9680245 [client] wayland: use locked pointer to implement capture mode
This prevents the host cursor from moving into another window in capture
mode, solving the problem of input going to an overlapping window in
capture mode, and also preventing loss of focus with focus_follows_mouse.
2021-05-04 18:17:19 +10:00
Quantum
00c2773e6b [client] ds: separate grab and capture logic
Currently, (un)grabPointer is used both for tracking/confining the mouse
in normal mode, as well as entering/exiting capture mode. This makes it
impossible to use separate cursor logic for capture mode, which is needed
to deal with overlapping windows for the Wayland backend.

This commit creates separate (un)capturePointer for entering/exiting
capture mode. There should be no behaviour changes.
2021-05-04 18:17:19 +10:00
Quantum
ee380451ca [client] wayland: synchronize host cursor position with guest
This mirrors the x11 implementation, allowing the pointer to move
correctly into overlapping windows.
2021-05-04 09:18:35 +10:00
Quantum
ba3243f88a [client] wayland: make input handlers aware of multiple surfaces
This prevents input handlers from breaking in presence of subsurfaces,
which are used by libdecor for client-side decorations.
2021-03-15 10:54:35 +11:00
Quantum
5649d1ad95 [client] wayland: split Wayland display server into modules
The Wayland display server is getting unwieldy due to the sheer size.
To make it easier to edit in the future, I split it into many components
based on logical boundaries.
2021-02-21 10:31:49 +11:00