Skip to content

Fix lock password focus after resume - #12652

Closed
dexteresc wants to merge 2 commits into
omacom:quattrofrom
dexteresc:fix-lock-password-focus-v2
Closed

dexteresc wants to merge 2 commits into
omacom:quattrofrom
dexteresc:fix-lock-password-focus-v2

Conversation

@dexteresc

@dexteresc dexteresc commented Sep 20, 2026 •

Copy link
Copy Markdown

Status

This is a narrow, event-driven alternative for the case where an already-active lock window loses its focus item. It intentionally does not add the explicit resume IPC, retry budget, or post-PAM recovery implemented by #9181, so it remains a draft while that overlap is resolved.

Related: #12525, #9180, #9418, #9181.

Summary

  • Restore keyboard focus when the active lock window loses its focused item.
  • Reclaim focus when the lock window becomes active after resume.
  • Recheck lock and authentication state before a deferred focus request runs.
  • Add a headless behavioral regression test that uses the real LockView.

Root cause

The lock surface can stay mounted while displays are blanked and the machine suspends. The existing focus requests only run when the component is created or input is enabled, so neither necessarily runs when an existing lock window becomes active again or loses its active focus item.

Test plan

  • Simplified regression fails against origin/quattro with password input did not reclaim focus.
  • Simplified regression passes 10 consecutive runs against this branch.
  • test/shell.d/lock-focus-test.sh
  • Focused lock test set
  • git diff --check
  • bash -n test/shell.d/lock-focus-test.sh
  • ./test/all executed; the new lock-focus test passes.

The full local suite reports 9 unrelated baseline/environment failures in config-test, factory-reset-accounts-test, launch-about-test, locate-test, network-qr-test, omarchy-kernel-migration-test, snapper-test, unowned-system-paths-test, and update-pacman-test. None of those files or their production paths are changed by this branch.

The regression harness is 100 lines, down from 213 in the first draft, and no longer requires a live compositor, jq, result files, or layer-shell setup.

No before/after media is attached yet. Keyboard focus is verified behaviorally by stealing focus from the real password input and confirming that it returns without a pointer click.

@dexteresc dexteresc mentioned this pull request Sep 20, 2026
6 tasks done
@dexteresc

dexteresc commented Sep 21, 2026 •

Copy link
Copy Markdown
Author

Closing as a duplicate of #8560, which directly addresses the same lock-screen password focus loss after suspend using the same small, event-driven focus recovery approach. Our branch also explored a behavioral test fixture for the regression. #9181 is a broader resume-recovery proposal, but #8560 is the closest match for this specific bug.

@dexteresc dexteresc closed this Sep 21, 2026
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