Skip to content

fix: fix launchpad fullsream, click dock ,it will not close.#1171

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-312863
Jun 27, 2025
Merged

fix: fix launchpad fullsream, click dock ,it will not close.#1171
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-bug-312863

Conversation

@wjyrich

@wjyrich wjyrich commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

as title.

Logs:

Summary by Sourcery

Emit a dockClicked D-Bus signal on dock clicks to allow full-screen launchpad popups to close.

Bug Fixes:

  • Close the full-screen launchpad popup when the dock is clicked by emitting a dedicated D-Bus signal.

Enhancements:

  • Add dockClicked signal to the Dock D-Bus interface XML.
  • Implement emitDockClicked method in DockPanel and expose it as Q_INVOKABLE.
  • Invoke emitDockClicked from QML on dock click events.

@sourcery-ai

sourcery-ai Bot commented Jun 24, 2025

Copy link
Copy Markdown

Reviewer's Guide

Adds a new D-Bus signal for dock clicks and hooks it in QML to ensure popups close correctly when clicking the dock under fullscreen launchpad.

Sequence diagram for dock click D-Bus signal emission

sequenceDiagram
    participant User as actor User
    participant QML as QML Layer
    participant DockPanel as DockPanel (C++)
    participant D-Bus as D-Bus Session Bus

    User->>QML: Clicks on empty dock area
    QML->>DockPanel: emitDockClicked()
    DockPanel->>D-Bus: Send dockClicked signal
Loading

Class diagram for DockPanel changes

classDiagram
    class DockPanel {
        +openDockSettings() const
        +emitDockClicked()
        launcherVisibleChanged(bool visible)
        ...
    }
Loading

File-Level Changes

Change Details Files
Introduce and emit a new dockClicked D-Bus signal
  • Imported QDBusMessage and QDBusConnection headers
  • Defined emitDockClicked() sending the dockClicked signal over session bus
  • Exposed emitDockClicked() as Q_INVOKABLE in the panel class
  • Declared the dockClicked signal in the D-Bus XML interface
panels/dock/dockpanel.cpp
panels/dock/dockpanel.h
panels/dock/api/old/org.deepin.dde.daemon.Dock1.xml
Invoke dockClicked emission on dock click in QML
  • Added call to Panel.emitDockClicked() inside the left-click handler after closing popups
panels/dock/package/main.qml

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 @wjyrich - I've reviewed your changes - here's some feedback:

  • Make sure to regenerate your DBus adaptor sources (via qdbusxml2cpp or your build step) so the new dockClicked signal is actually exported at runtime.
  • Consider adding error handling or checking that the session bus send succeeds in emitDockClicked() to avoid silent failures if the message isn’t delivered.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Make sure to regenerate your DBus adaptor sources (via qdbusxml2cpp or your build step) so the new `dockClicked` signal is actually exported at runtime.
- Consider adding error handling or checking that the session bus send succeeds in `emitDockClicked()` to avoid silent failures if the message isn’t delivered.

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.

Comment thread panels/dock/package/main.qml Outdated
// TODO
signal dockCenterPartPosChanged()
signal pressedAndDragging(bool isDragging)
signal closeLaunchpadFullScreen()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

dock是不知道有launchpad的,

@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

关键摘要:

  • 新增的 viewDeactivated() 信号在 mousePressEvent 中被调用,但没有对应的处理逻辑,可能会导致未定义行为。
  • viewDeactivated() 信号的使用没有在文档或注释中说明其用途和预期行为。

是否建议立即修改:

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, 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 Jun 27, 2025

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Jun 27, 2025

Copy link
Copy Markdown

This pr force merged! (status: unknown)

@deepin-bot deepin-bot Bot merged commit e563d12 into linuxdeepin:master Jun 27, 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.

3 participants