Skip to content

fix: switch user login password input unresponsive#1020

Draft
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/switch-user-login-password-input
Draft

fix: switch user login password input unresponsive#1020
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/switch-user-login-password-input

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor

Summary

Fix the issue where switching users results in an unresponsive password input field on the login screen.

Root Cause

GreeterProxy::lock() did not immediately set isLocked when the active session is a real user (non-"dde"), causing keyboard focus to not transfer to the lock screen QML.

Changes

  1. Add setLock(true) in lock() for real user branch to immediately set isLocked state
  2. Downgrade onSessionLock() log from qCWarning to qCDebug for non-active session ID branch, since this is expected when lock() already set isLocked
  3. Add ordering dependency comment in setLock() to prevent re-entry (m_isLocked must be set before m_lockScreen->lock())
  4. Use Qt.callLater in updateUser() to delay forceActiveFocus until event loop iteration ends, ensuring UserList Popup close has taken effect

Testing

  • Test user switching from power management interface
  • Verify password input field gets focus after user selection
  • Test lock/unlock cycle with real user sessions

@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

1. Add setLock(true) in lock() for real user branch to immediately
   set isLocked state
2. The root cause is lock() did not immediately set isLocked, causing
   keyboard focus not transferred to lock screen QML
3. Downgrade onSessionLock() log from qCWarning to qCDebug for
   non-active session id branch
4. Add ordering dependency comment in setLock() to prevent re-entry
5. Use Qt.callLater in updateUser() to delay forceActiveFocus until
   event loop iteration ends

Log: Fixed switch user login screen password input unresponsive issue

Influence:
1. Test user switching from power management interface
2. Verify password input field gets focus after user selection
3. Test lock/unlock cycle with real user sessions

fix: 切换用户登录输入密码无响应

1. 在 lock() 真实用户分支中添加 setLock(true)
   立即设置 isLocked 状态
2. 根因是 lock() 未立即设置 isLocked,
   导致键盘焦点未转移到锁屏 QML
3. 将 onSessionLock() 中非活跃 session 的日志
   从 qCWarning 降级为 qCDebug
4. 在 setLock() 中添加顺序依赖注释防止重入
5. 在 updateUser() 中使用 Qt.callLater
   延迟 forceActiveFocus 到事件循环末尾

Log: 修复切换用户登录界面输入密码无响应问题

Influence:
1. 测试从电源管理界面切换用户功能
2. 验证用户选择后密码输入框获得焦点
3. 测试真实用户会话的锁定/解锁循环
@deepin-wm deepin-wm force-pushed the fix/switch-user-login-password-input branch from 3d6aa43 to 92b78d1 Compare June 18, 2026 13:14
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.

2 participants