Skip to content

Conversation

@wineee
Copy link
Member

@wineee wineee commented Jun 9, 2025

Log: fix bug 305717 系统缩放调整到125%,最大化应用窗口后会被任务栏覆盖

Summary by Sourcery

Bug Fixes:

  • Apply scaling factor to the sum of boundary, window bottom, and exclusion zone in strut calculation to prevent taskbar overlap at non-default system scales

@sourcery-ai
Copy link

sourcery-ai bot commented Jun 9, 2025

Reviewer's Guide

Fixed scale factor application in bottom strut calculation for X11 layer shell emulation to ensure maximized windows respect the taskbar at non-default scaling.

File-Level Changes

Change Details Files
Corrected arithmetic grouping for bottom strut scaling
  • Moved multiplication by scaleFactor outside of the exclusion zone term
  • Wrapped the entire boundary-minus-rect bottom and exclusion zone sum in parentheses
frame/layershell/x11dlayershellemulation.cpp

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

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

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

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

yixinshark
yixinshark previously approved these changes Jun 9, 2025
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码格式和可读性

    • 在修改后的代码中,对表达式进行了括号调整,这有助于提高代码的可读性。建议保持这种格式一致性,特别是在复杂的表达式计算中。
  2. 逻辑正确性

    • 代码逻辑看起来是正确的,没有发现明显的逻辑错误。但是,建议进行更多的单元测试来确保在所有情况下(例如,边界值、不同锚点组合等)逻辑都能正常工作。
  3. 性能考虑

    • 代码中没有明显的性能问题,但是如果有更多的上下文,比如这个函数被频繁调用,那么性能优化可能需要考虑。
  4. 安全性

    • 代码中没有涉及到安全性问题,如内存泄漏、未定义行为等。但是,确保所有外部输入都经过适当的验证和清理是一个好习惯。
  5. 注释和文档

    • 虽然代码改动较小,但建议添加或更新相关的注释,特别是对于新添加的括号,解释为什么这样做可以提高代码的可读性。
  6. 一致性

    • 确保代码风格和命名约定与项目中的其他代码保持一致。例如,变量命名是否遵循了项目的命名规范。

总体来说,代码改动是合理的,没有引入新的问题,但是建议进行更多的测试和代码审查来确保代码的质量和稳定性。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wineee, yixinshark

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

Log: fix bug 305717 系统缩放调整到125%,最大化应用窗口后会被任务栏覆盖
@yixinshark
Copy link
Contributor

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Jun 10, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit c2ef52a into linuxdeepin:master Jun 10, 2025
7 of 10 checks passed
@wineee wineee deleted the layershell branch June 10, 2025 02:39
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