[client] input: synchronize host lock state over LGMP
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

Cache native keyboard lock state across input-provider transitions and
reconcile it with HID LED feedback over LGMP.

Project raw and corrective lock-key transitions through the reliable
input FIFO, defer correction until outstanding transitions settle, and
recover from delayed or missing feedback without double toggling.
This commit is contained in:
Geoffrey McRae
2026-08-21 15:03:57 +10:00
parent efb397bbaf
commit 53917c4918
9 changed files with 612 additions and 105 deletions

View File

@@ -132,10 +132,22 @@ static bool moveExit(double ex, double ey)
return inside;
}
static bool inputPolicyEnabled(void)
{
return !g_state.ignoreInput &&
((g_cursor.grab && g_params.captureInputOnly) ||
!g_params.captureInputOnly);
}
bool core_inputEnabled(void)
{
return lgInput_available() && !g_state.ignoreInput &&
((g_cursor.grab && g_params.captureInputOnly) || !g_params.captureInputOnly);
return lgInput_available() && inputPolicyEnabled();
}
void core_updateKeyboardLEDsSync(void)
{
lgInput_setKeyboardLEDsSync(
inputPolicyEnabled() && !evdev_isExclusive());
}
void core_updateKeyboardGrab(void)
@@ -154,6 +166,7 @@ void core_updateKeyboardGrab(void)
(capture || (inputEnabled && (view || automatic)));
evdev_setGrab(active, localActive && g_cursor.grab);
core_updateKeyboardLEDsSync();
if (active)
g_state.ds->grabKeyboard();
else