Skip to content

feat: defer layer shell anchor config to onCompleted - #842

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-382737
Nov 9, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-382737

Conversation

@wjyrich

@wjyrich wjyrich commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor
  1. Move DLayerShellWindow.anchors assignment from property binding to Component.onCompleted handler in launcher item popup
  2. The previous direct property assignment could be evaluated before DLayerShellWindow is fully attached, causing anchors to be applied incorrectly or ignored
  3. Using Component.onCompleted ensures the layer shell window is fully initialized before setting AnchorNone

Log: Fixed launcher popup layer shell anchor initialization timing

Influence:

  1. Verify the launcher popup/window appears in the correct position without layer shell anchor issues
  2. Open and close the launcher multiple times to confirm the popup displays correctly each time
  3. Test on different screen configurations and multi-monitor setups
  4. Verify the popup does not unexpectedly anchor to screen edges
  5. Test app launch via popup and confirm no positioning regressions

feat: 将层级外壳锚点配置延迟到 onCompleted

  1. 将 launcher 项弹窗中 DLayerShellWindow.anchors 的赋值从属性绑定移至 Component.onCompleted 处理函数
  2. 原先的直接属性赋值可能在 DLayerShellWindow 完全附加前就被求值,导致锚 点被错误应用或被忽略
  3. 使用 Component.onCompleted 确保在设置 AnchorNone 之前层级外壳窗口已完 全初始化

Log: 修复启动器弹窗层级外壳锚点初始化时序问题

Influence:

  1. 验证启动器弹窗/窗口位置正确,无层级外壳锚点问题
  2. 多次打开和关闭启动器,确认弹窗每次都能正确显示
  3. 在不同屏幕配置和多显示器环境下测试
  4. 验证弹窗不会意外锚定到屏幕边缘
  5. 测试通过弹窗启动应用,确认无定位回归问题

PMS: BUG-382737

Summary by Sourcery

Bug Fixes:

  • Fix launcher popup layer-shell anchor initialization so the window avoids incorrect or ignored anchoring during startup.

1. Move DLayerShellWindow.anchors assignment from property binding to
Component.onCompleted handler in launcher item popup
2. The previous direct property assignment could be evaluated before
DLayerShellWindow is fully attached, causing anchors to be applied
incorrectly or ignored
3. Using Component.onCompleted ensures the layer shell window is fully
initialized before setting AnchorNone

Log: Fixed launcher popup layer shell anchor initialization timing

Influence:
1. Verify the launcher popup/window appears in the correct position
without layer shell anchor issues
2. Open and close the launcher multiple times to confirm the popup
displays correctly each time
3. Test on different screen configurations and multi-monitor setups
4. Verify the popup does not unexpectedly anchor to screen edges
5. Test app launch via popup and confirm no positioning regressions

feat: 将层级外壳锚点配置延迟到 onCompleted

1. 将 launcher 项弹窗中 DLayerShellWindow.anchors 的赋值从属性绑定移至
Component.onCompleted 处理函数
2. 原先的直接属性赋值可能在 DLayerShellWindow 完全附加前就被求值,导致锚
点被错误应用或被忽略
3. 使用 Component.onCompleted 确保在设置 AnchorNone 之前层级外壳窗口已完
全初始化

Log: 修复启动器弹窗层级外壳锚点初始化时序问题

Influence:
1. 验证启动器弹窗/窗口位置正确,无层级外壳锚点问题
2. 多次打开和关闭启动器,确认弹窗每次都能正确显示
3. 在不同屏幕配置和多显示器环境下测试
4. 验证弹窗不会意外锚定到屏幕边缘
5. 测试通过弹窗启动应用,确认无定位回归问题

PMS: BUG-382737
@sourcery-ai

sourcery-ai Bot commented Nov 9, 2026

Copy link
Copy Markdown

Reviewer's Guide

UI

Defer the launcher popup’s layer-shell anchor assignment until component completion so it is applied after the window is initialized.

  • shell-launcher-applet/package/launcheritem.qml L414-416

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

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

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 100 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本次提交将 DLayerShellWindow 锚点配置从对象构造期的属性绑定改为延迟到 Component.onCompleted 中以命令式赋值执行,修复了 layer shell 窗口尚未就绪时 锚点配置不生效的问题。变更范围极小、目的明确、语法正确,四维度均无问题, 无安全漏洞。OCR 因 merge-base 缺失未能完成,不影响结论。

🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: []


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例

// 当前写法已为合理修复,无需额外修改。可选优化:若需确保只在首次生效, // 可保持现状即可: // // Component.onCompleted: { //     DLayerShellWindow.anchors = DLayerShellWindow.AnchorNone // }

本报告由 AI 代码审查工具自动生成

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: BLumia, robertkill, wjyrich

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

@wjyrich

wjyrich commented Nov 9, 2026

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Nov 9, 2026

Copy link
Copy Markdown

This pr force merged! (status: behind)

@deepin-bot
deepin-bot Bot merged commit 35343f5 into linuxdeepin:master Nov 9, 2026
5 checks passed
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.

4 participants