fix: allow lockscreen shortcut in multitaskview mode#1016
Draft
deepin-wm wants to merge 1 commit into
Draft
Conversation
1. Extend Lockscreen action condition to include Multitaskview mode 2. Extend ShutdownMenu action condition to include Multitaskview mode 3. Add immediatelyExit and deleteTaskSwitch calls in ShutdownMenu 4. Extend handleLockScreen three callbacks to support Multitaskview 5. Add immediatelyExit and deleteTaskSwitch in handleLockScreen callbacks Log: Fixed Super+L lockscreen shortcut not working in multitask view Influence: 1. Test Super+L lockscreen shortcut in multitask view mode 2. Test Super+L lockscreen shortcut in normal desktop mode 3. Test shutdown menu shortcut in multitask view mode 4. Test shutdown menu shortcut in normal desktop mode 5. Test lockscreen D-Bus callbacks in multitask view mode fix: 允许多任务视图下使用锁屏快捷键 1. 扩展 Lockscreen 动作条件以包含 Multitaskview 模式 2. 扩展 ShutdownMenu 动作条件以包含 Multitaskview 模式 3. 在 ShutdownMenu 中添加 immediatelyExit 和 deleteTaskSwitch 调用 4. 扩展 handleLockScreen 三个回调以支持 Multitaskview 模式 5. 在 handleLockScreen 回调中添加 immediatelyExit 和 deleteTaskSwitch Log: 修复多任务视图下 Super+L 锁屏快捷键无响应的问题 Influence: 1. 测试多任务视图下 Super+L 锁屏快捷键 2. 测试普通桌面模式下 Super+L 锁屏快捷键 3. 测试多任务视图下关机菜单快捷键 4. 测试普通桌面模式下关机菜单快捷键 5. 测试多任务视图下锁屏 D-Bus 回调
Reviewer's GuideExtends lockscreen- and shutdown-related shortcuts and D-Bus callbacks to work when the compositor is in Multitaskview mode, ensuring proper exit from multitask view before transitioning to the lockscreen or shutdown UI. Sequence diagram for lockscreen shortcut from Multitaskview modesequenceDiagram
actor User
participant ShortcutRunner
participant Helper
participant MultitaskView
participant LockScreen
User->>ShortcutRunner: Super+L (ShortcutAction::Lockscreen)
ShortcutRunner->>Helper: showLockScreen()
alt currentMode == Normal or Multitaskview
opt currentMode == Multitaskview and m_multitaskView
Helper->>MultitaskView: immediatelyExit()
Helper->>Helper: deleteTaskSwitch()
end
Helper->>Helper: setCurrentMode(LockScreen)
Helper->>LockScreen: lock()
Helper->>Helper: setWorkspaceVisible(false)
else other modes
ShortcutRunner-->>User: [lockscreen ignored]
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Skipping CI for Draft Pull Request. |
|
[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. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Super+L lockscreen shortcut not responding in multitask view mode.
Changes
Multitaskviewmode (previously onlyNormalmode was allowed)immediatelyExit()anddeleteTaskSwitch()calls in ShutdownMenu branch to properly exit multitask view before entering lockscreenhandleLockScreenthree callbacks (shutdown,lock,switchUser) to supportMultitaskviewmodeimmediatelyExit()anddeleteTaskSwitch()in handleLockScreen callbacks to properly transition from multitask view to lockscreenBug Reference
进入多任务视图后,键入 Super+L 锁屏快捷键无响应,但在普通桌面状态下可以正常工作。
Root cause:
ShortcutRunner::onActionTriggerandHelper::handleLockScreencallbacks explicitly checkedcurrentMode() == CurrentMode::Normal, silently ignoring the action when in Multitaskview mode.Testing
Summary by Sourcery
Allow lockscreen and shutdown shortcuts to work correctly when the shell is in multitask view mode.
Bug Fixes:
Enhancements: