Skip to content

fix: when fullscreen, click dock, launchpad will not close.#587

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

fix: when fullscreen, click dock, launchpad will not close.#587
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
wjyrich:312863

Conversation

@wjyrich

@wjyrich wjyrich commented Jun 24, 2025

Copy link
Copy Markdown
Contributor

as title.

Logs:

Summary by Sourcery

Integrate DdeDock to listen for dock click events and automatically hide the launcher when the dock is clicked in fullscreen mode.

Bug Fixes:

  • Ensure the launcher closes when the dock is clicked while in fullscreen.

Enhancements:

  • Add a dockClicked signal to DdeDock and connect the DBus Dock1 dockClicked signal to it.
  • Instantiate DdeDock in LauncherController and connect its dockClicked signal to hide the launcher.

@sourcery-ai

sourcery-ai Bot commented Jun 24, 2025

Copy link
Copy Markdown

Reviewer's Guide

This PR introduces a DdeDock helper to listen for dockClicked DBus signals and integrates it into LauncherController to automatically hide the launcher when the dock is clicked, addressing the fullscreen case.

Sequence diagram for hiding launcher on dock click

sequenceDiagram
    participant User as actor User
    participant Dock as DdeDock
    participant Launcher as LauncherController

    User->>Dock: Clicks on dock
    Dock->>Dock: Receives dockClicked DBus signal
    Dock-->>Launcher: Emits dockClicked signal
    Launcher->>Launcher: setVisible(false) (if visible)
    Launcher-->>User: Launcher hides
Loading

Class diagram for DdeDock and LauncherController integration

classDiagram
    class DdeDock {
        +dockClicked()
        -updateDockRectAndPositionFromDBus()
    }
    class LauncherController {
        -m_dockIntegration : DdeDock*
        +LauncherController(QObject*)
        +setVisible(bool)
        +visible() : bool
    }
    DdeDock <.. LauncherController : uses
    DdeDock : +signal dockClicked()
    LauncherController : +slot (lambda) on dockClicked
Loading

File-Level Changes

Change Details Files
Integrated DdeDock into LauncherController to handle dock click events.
  • Include DdeDock header in LauncherController
  • Add m_dockIntegration member
  • Instantiate DdeDock in the constructor
  • Connect dockClicked to setVisible(false)
launchercontroller.cpp
launchercontroller.h
Extended DdeDock to expose and emit dockClicked.
  • Add dockClicked signal declaration
  • Connect DBus dockClicked signal to local dockClicked
src/ddeintegration/ddedock.cpp
src/ddeintegration/ddedock.h
Updated the DBus interface XML to declare dockClicked.
  • Add entry
src/ddeintegration/xml/org.deepin.dde.daemon.Dock1.xml

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

Comment thread src/ddeintegration/xml/org.deepin.dde.daemon.Dock1.xml Outdated
@18202781743

Copy link
Copy Markdown
Contributor

Comment thread shell-launcher-applet/package/launcheritem.qml Outdated
@wjyrich
wjyrich force-pushed the 312863 branch 2 times, most recently from af1d928 to 32679b2 Compare June 24, 2025 09:17
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

关键摘要:

  • 新增的onViewDeactivated函数中,LauncherController.currentFrameLauncherController.visible的访问可能需要确保它们是可访问的,并且已经初始化。
  • LauncherController.hideWithTimer()函数调用可能需要检查其实现,确保它不会导致死循环或者不必要的资源消耗。

是否建议立即修改:

@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: behind)

@deepin-bot
deepin-bot Bot merged commit 2e3c37e into linuxdeepin:master Jun 27, 2025
9 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