Skip to content

fix(lockscreen): clear the freed xkb state and report a missing keymap - #45

Open
perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:pr/lock-keymap-failure-20261025
Open

perlowja wants to merge 1 commit into
singularityos-lab:mainfrom
perlowja:pr/lock-keymap-failure-20261025

Conversation

@perlowja

Copy link
Copy Markdown
Contributor

kb_keymap() unreferenced the old xkb_state but left the pointer set, so a keymap that failed to compile left kb_key() using freed memory. It now clears it, logs each keymap failure, and shows "Keyboard unavailable" when a key arrives without a keymap instead of silently dropping it.

Generative AI assistance

AI assistance: disclosed

kb_keymap() unreferenced the old xkb_state but left the pointer set, so
if the new keymap failed to compile, kb_key() kept using freed memory.
Clear it first. Each keymap failure path also returned silently, which
left a lock that drew normally but dropped every key; log the reason,
and show "Keyboard unavailable" when a key arrives without a keymap.

Assisted-by: Claude Code:claude-opus-5-5
AI-Scope: cleared the stale xkb_state, added failure logging in kb_keymap and the unavailable status in kb_key in lock_main.c.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant