Skip to content

fix: Fixed the blurriness of the preview window to separate the X11 a…#1175

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-treeland-314371
Jul 2, 2025
Merged

fix: Fixed the blurriness of the preview window to separate the X11 a…#1175
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-treeland-314371

Conversation

@wjyrich

@wjyrich wjyrich commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

…nd wayland environments.

PMS-BUG-314371 .

Logs:

Summary by Sourcery

Bug Fixes:

  • Apply preview opacity updates only when running on the XCB (X11) platform, avoiding unintended effects on Wayland

@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 @wjyrich - I've reviewed your changes and they look great!


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.

@sourcery-ai

sourcery-ai Bot commented Jul 2, 2025

Copy link
Copy Markdown

Reviewer's Guide

The PR introduces a platform guard in TaskManager::modifyOpacityChanged to ensure the X11-specific preview opacity adjustment is only applied when running on the “xcb” backend, preventing unintended behavior on Wayland.

Class diagram for TaskManager::modifyOpacityChanged platform-specific logic

classDiagram
    class TaskManager {
        +modifyOpacityChanged()
        -m_windowMonitor
    }
    class X11WindowMonitor {
        +setPreviewOpacity(opacity: double)
    }
    TaskManager --> X11WindowMonitor : uses (only if platform is xcb)
Loading

File-Level Changes

Change Details Files
Scope preview opacity updates to X11 platform only
  • Wrap the X11WindowMonitor cast and setPreviewOpacity call in a QGuiApplication::platformName() == "xcb" check
panels/dock/taskmanager/taskmanager.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

Comment thread panels/dock/taskmanager/taskmanager.cpp Outdated
…nd wayland environments.

PMS-BUG-314371 .

Logs:
@wjyrich wjyrich force-pushed the fix-treeland-314371 branch from c5bdb05 to c59c435 Compare July 2, 2025 02:12
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

代码审查意见:

  1. 代码简化

    • 在修改后的代码中,使用了if语句的初始化列表来简化了x11Monitor的检查和赋值。这是一个好的做法,因为它减少了代码的重复,并使逻辑更加清晰。
  2. 错误处理

    • else分支中,当appearanceAppletnull时,使用了qWarning()来记录警告信息。这是一个合理的做法,但可能需要考虑是否需要更详细的错误信息,以便于调试和问题追踪。
  3. 代码风格

    • 代码缩进和格式看起来是正确的,没有发现明显的格式问题。
  4. 潜在的性能问题

    • 没有发现明显的性能问题,因为这段代码主要是进行属性检查和简单的对象转换。
  5. 代码可读性

    • 代码的可读性得到了提升,因为使用了if语句的初始化列表,使得代码更加简洁。
  6. 安全性

    • 从代码中看不出明显的安全问题,因为这段代码主要是进行属性检查和对象转换。

总体来说,代码修改是合理的,没有发现严重的逻辑错误或安全问题。但是,建议在else分支中添加更详细的错误信息,以便于调试和问题追踪。

@justforlxz justforlxz requested a review from 18202781743 July 2, 2025 02:22
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, justforlxz, 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 Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jul 2, 2025

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot deepin-bot Bot merged commit 9bda8c8 into linuxdeepin:master Jul 2, 2025
7 of 10 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