[client] input: fix focus capture startup

Capture-on-focus could consume the initial focus event before an input
provider became available. The focused state then suppressed any later
attempt to establish capture.

Treat explicit capture as local window state, refresh keyboard ownership
on focus and input-policy changes, and preserve pre-ungrab availability
for key release. Fall back to the window center when guest cursor
geometry is not ready.
This commit is contained in:
Geoffrey McRae
2026-08-21 04:23:42 +10:00
parent 82c59cecf2
commit 1a5bdc14aa
4 changed files with 36 additions and 20 deletions

View File

@@ -24,6 +24,7 @@
#include <stdbool.h>
bool core_inputEnabled(void);
void core_updateKeyboardGrab(void);
void core_invalidatePointer(bool detectInView);
void core_setCursorInView(bool enable);
void core_handleGrabEvent(bool active);