fix(launcher): adjust window layer and flags for proper display#738
Merged
BLumia merged 1 commit intolinuxdeepin:masterfrom Mar 17, 2026
Merged
fix(launcher): adjust window layer and flags for proper display#738BLumia merged 1 commit intolinuxdeepin:masterfrom
BLumia merged 1 commit intolinuxdeepin:masterfrom
Conversation
Change window layer from Overlay to Top and add dynamic flags based on debug mode to ensure proper window behavior. 调整窗口层级从Overlay到Top,并根据调试模式动态设置窗口标志, 确保窗口行为正确。 Log: 修复启动器窗口层级和标志设置 PMS: BUG-353181 Influence: 修复后启动器窗口将以正确的层级显示,避免窗口遮挡或显示异常问题。
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts the launcher applet window’s layer and window flags to ensure it displays at the correct stacking level and behaves properly in both normal and debug modes. Sequence diagram for launcher window creation with debug-dependent flagssequenceDiagram
actor User
participant LauncherApplet
participant DebugHelper
participant DLayerShellWindow
participant WindowManager
User->>LauncherApplet: triggerLauncher()
LauncherApplet->>DebugHelper: get useRegularWindow
DebugHelper-->>LauncherApplet: useRegularWindow
alt useRegularWindow is true
LauncherApplet->>DLayerShellWindow: set layer LayerTop
LauncherApplet->>DLayerShellWindow: set flags Qt.Window
LauncherApplet->>DLayerShellWindow: set keyboardInteractivity OnDemand
LauncherApplet->>DLayerShellWindow: set exclusionZone -1
LauncherApplet->>DLayerShellWindow: set scope dde-shell/launchpad
LauncherApplet->>DLayerShellWindow: set DWindow.enabled false
else useRegularWindow is false
LauncherApplet->>DLayerShellWindow: set layer LayerTop
LauncherApplet->>DLayerShellWindow: set flags Qt.FramelessWindowHint | Qt.Tool
LauncherApplet->>DLayerShellWindow: set keyboardInteractivity OnDemand
LauncherApplet->>DLayerShellWindow: set exclusionZone -1
LauncherApplet->>DLayerShellWindow: set scope dde-shell/launchpad
LauncherApplet->>DLayerShellWindow: set DWindow.enabled true
end
DLayerShellWindow->>WindowManager: map window with LayerTop and flags
WindowManager-->>User: launcher window visible at correct stacking level
Flow diagram for launcher window layer and flag selectionflowchart TD
A["Launcher requested"] --> B["Set DLayerShellWindow.layer = LayerTop"]
B --> C{DebugHelper.useRegularWindow?}
C -->|true| D["flags = Qt.Window"]
C -->|false| E["flags = Qt.FramelessWindowHint | Qt.Tool"]
D --> F["DWindow.enabled = false"]
E --> G["DWindow.enabled = true"]
F --> H["Apply keyboardInteractivity = OnDemand"]
G --> H
H --> I["Set exclusionZone = -1"]
I --> J["Set scope = dde-shell/launchpad"]
J --> K["Window manager displays launcher at correct stacking level"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review这段代码修改主要是针对启动器窗口的层级和窗口属性进行的调整。以下是从语法逻辑、代码质量、代码性能和代码安全四个方面的详细审查和改进建议: 1. 语法逻辑
2. 代码质量
3. 代码性能
4. 代码安全
改进后的代码示例DLayerShellWindow.anchors: DLayerShellWindow.AnchorBottom | DLayerShellWindow.AnchorTop | DLayerShellWindow.AnchorLeft | DLayerShellWindow.AnchorRight
DLayerShellWindow.layer: DLayerShellWindow.LayerTop // 改为 LayerTop 以避免覆盖锁屏等特殊界面
DLayerShellWindow.keyboardInteractivity: DLayerShellWindow.KeyboardInteractivityOnDemand
DLayerShellWindow.exclusionZone: -1
DLayerShellWindow.scope: "dde-shell/launchpad"
// 窗口标志位:调试模式下使用常规窗口,否则使用无边框工具窗口
flags: DebugHelper.useRegularWindow ? Qt.Window : (Qt.FramelessWindowHint | Qt.Tool)
DWindow.enabled: !DebugHelper.useRegularWindow
DWindow.windowRadius: 0
DWindow.enableSystemResize: false总结
如果需要进一步优化或调整,请提供更多上下文或需求细节! |
BLumia
approved these changes
Mar 17, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: add-uos, BLumia 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.
Change window layer from Overlay to Top and add dynamic flags based on debug mode to ensure proper window behavior.
调整窗口层级从Overlay到Top,并根据调试模式动态设置窗口标志,
确保窗口行为正确。
Log: 修复启动器窗口层级和标志设置
PMS: BUG-353181
Influence: 修复后启动器窗口将以正确的层级显示,避免窗口遮挡或显示异常问题。
Summary by Sourcery
Bug Fixes: