Skip to content

fix(lockscreen): keep password input focused after suspend/wake - #8869

Closed
Phuocminh94 wants to merge 1 commit into
omacom:quattrofrom
Phuocminh94:patch-1
Closed

Phuocminh94 wants to merge 1 commit into
omacom:quattrofrom
Phuocminh94:patch-1

Conversation

@Phuocminh94

Copy link
Copy Markdown

When waking the system from suspend, the lock screen completely fails to regain keyboard focus. The password input becomes entirely unresponsive, and the user is effectively locked out of the session, forcing them to switch to a TTY to restart the display manager.

Solution:

  • Added focus: true to the TextInput to ensure default focus behavior.
  • Added a fallback Timer at the root level of LockView.qml. It polls every 100ms to force focus on the password input only if the lock screen is active but the input lacks activeFocus. The timer automatically stops (running = false) the moment activeFocus is acquired.

Fixes an issue where the lock screen loses keyboard focus after wake/suspend on Wayland.
Copilot AI balanced review requested due to automatic review settings August 29, 2026 04:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves lock-screen keyboard focus recovery after suspend/wake.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Gives the password input default focus.
  • Adds a retry timer to restore lost focus.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.


Timer {
interval: 100
running: root.inputEnabled && !root.authenticatingPassword && !passwordInput.activeFocus
Comment on lines +222 to +227
interval: 100
running: root.inputEnabled && !root.authenticatingPassword && !passwordInput.activeFocus
repeat: true
onTriggered: {
root.forcePasswordFocus()
}
@bjarneo

bjarneo commented Sep 21, 2026

Copy link
Copy Markdown
Member

Automated duplication check: this pull request looks similar to #7592, which covers the same lock refocus timer. I keep that one open and close this one to consolidate review.

If you feel this is the wrong decision, please open the PR again with a note on the difference.

@bjarneo bjarneo 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.

3 participants