[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

@@ -2096,6 +2096,8 @@ void evdev_dispatch(void * opaque)
evdev_barrierMatches(&output.barrier, desiredState))
{
evdev_dispatchReset(output.barrier.lanes);
if (output.barrier.activate & EVDEV_GRAB_KEYBOARD)
lgInput_setKeyboardLEDsSync(false);
evdev_publishActive(output.barrier.deactivate, false);
evdev_publishActive(output.barrier.activate, true);
const uint64_t currentState = atomic_load_explicit(
@@ -2103,6 +2105,7 @@ void evdev_dispatch(void * opaque)
if (output.barrier.activate &&
!evdev_barrierMatches(&output.barrier, currentState))
evdev_publishActive(output.barrier.activate, false);
core_updateKeyboardLEDsSync();
}
atomic_store_explicit(&state.barrierAck,
output.barrier.serial, memory_order_release);