[client] input: stop absolute cursor feedback
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / idd (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run

X11's legacy guest-position synchronization warps the host cursor to
delayed guest updates. With absolute input this feeds old positions back
through cooked motion and pulls the cursor away from window edges.

Skip display-server guest synchronization when the active input is
absolute. Relative input and explicit uncapture alignment are unchanged.
This commit is contained in:
Geoffrey McRae
2026-08-10 19:29:22 +10:00
parent 89dcf56073
commit d20904e3af
3 changed files with 46 additions and 10 deletions

View File

@@ -642,6 +642,11 @@ void core_stopFrameThread(void)
void core_handleGuestMouseUpdate(void)
{
/* The local cursor is authoritative with absolute input. Sending delayed
* guest positions back to the display server creates a warp feedback loop. */
if (lgInput_supports(LG_INPUT_SUPPORT_MOUSE_ABSOLUTE))
return;
struct DoublePoint localPos;
if (!util_guestCurToLocal(&localPos))
{