[client] input: fix automatic keyboard capture

Treat autoCapture as keyboard ownership while the pointer is inside the
guest viewport. Predict the next local position for both absolute and
relative motion, then release the keyboard before the pointer crosses
an edge.

Keep capture, focus, and deferred evdev transitions consistent while
retaining the latest local position as the prediction baseline.
This commit is contained in:
Geoffrey McRae
2026-08-11 14:42:01 +10:00
parent d20904e3af
commit 77b661194a
9 changed files with 327 additions and 72 deletions

View File

@@ -412,7 +412,7 @@ static struct Option options[] =
{
.module = "input",
.name = "autoCapture",
.description = "Try to keep the mouse captured when needed",
.description = "Grab the keyboard in the guest view and release it before exit",
.type = OPTION_TYPE_BOOL,
.value.x_bool = false
},