Skip to content

fix: keep empty app tray hidden during plugin drags - #1924

Open
52cyb wants to merge 1 commit into
linuxdeepin:masterfrom
52cyb:master
Open

52cyb wants to merge 1 commit into
linuxdeepin:masterfrom
52cyb:master

Conversation

@52cyb

@52cyb 52cyb commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor
  1. Validate the drag source before activating tray drag state.
  2. Suppress forced stash visibility for non-application tray items.
  3. Clear drag state when the drop completes or leaves the tray.

Log: Keep the empty app tray hidden when dragging quick panel plugins

Influence:

  1. Drag a quick panel plugin over the empty app tray position.
  2. Drop a plugin at a valid dock position and verify it is placed.
  3. Drag an application tray icon and verify the stash can open.

fix: 修复插件拖拽时空应用托盘意外显示

  1. 校验拖拽来源后再更新托盘拖拽状态。
  2. 拖动普通插件时抑制空应用托盘及其占位。
  3. 放下图标或离开托盘时清理拖拽状态。

Influence:

  1. 从快捷面板拖动插件到空应用托盘原位置,确认箭头和占位保持隐藏。
  2. 将插件拖到任务栏的合法位置,确认可以正常放置。
  3. 拖动应用托盘图标,确认仍可唤出应用托盘。

Log: 修复快捷面板插件拖拽时空应用托盘意外显示的问题
PMS: BUG-384429

Summary by Sourcery

Prevent non-application tray drags from revealing the empty application tray, without disrupting valid drops or application-tray dragging.

Bug Fixes:

  • Keep the empty application tray and its stash action hidden when dragging non-application items over it, while preserving stash access for application-tray drags.
  • Validate tray drag sources before activating drag state, and clear that state when a drop completes or the drag leaves the tray.

1. Validate the drag source before activating tray drag state.
2. Suppress forced stash visibility for non-application tray items.
3. Clear drag state when the drop completes or leaves the tray.

Log: Keep the empty app tray hidden when dragging quick panel plugins

Influence:
1. Drag a quick panel plugin over the empty app tray position.
2. Drop a plugin at a valid dock position and verify it is placed.
3. Drag an application tray icon and verify the stash can open.

fix: 修复插件拖拽时空应用托盘意外显示

1. 校验拖拽来源后再更新托盘拖拽状态。
2. 拖动普通插件时抑制空应用托盘及其占位。
3. 放下图标或离开托盘时清理拖拽状态。

Influence:
1. 从快捷面板拖动插件到空应用托盘原位置,确认箭头和占位保持隐藏。
2. 将插件拖到任务栏的合法位置,确认可以正常放置。
3. 拖动应用托盘图标,确认仍可唤出应用托盘。

Log: 修复快捷面板插件拖拽时空应用托盘意外显示的问题
PMS: BUG-384429
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 52cyb

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

@sourcery-ai

sourcery-ai Bot commented Dec 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

API

Expose tray drag-state control to QML and implement the model entry point that tracks drag activity and suppresses stash visibility for non-application items.

  • panels/dock/tray/traysortordermodel.cpp L74-91
  • panels/dock/tray/traysortordermodel.h L65

Uses of the API

Validate drag sources before activating tray drag state, and clear that state when a drop completes or the drag leaves the tray.

  • panels/dock/tray/package/TrayContainer.qml L162-166 (+3 small edits)

Implementation

Track whether stash visibility is suppressed during a drag and apply that suppression when calculating the stash action's visual visibility.

  • panels/dock/tray/traysortordermodel.cpp L414
  • panels/dock/tray/traysortordermodel.h L93

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

deepin-ci-robot commented Dec 3, 2026 •

Copy link
Copy Markdown

⚠️ OBS CI 构建警告日志 (Commit: 6d3666cd)

提示:以下为 OBS CI 构建中 Lintian 检测到的警告信息,默认折叠,点击展开查看详情。完整日志请参阅对应构建状态链接。

deepin_develop / aarch64 (Lintian 警告: 15 条)
[ 1020s] W: dde-shell: desktop-command-not-in-package bin/false [usr/share/applications/org.deepin.dde-shell.desktop]
[ 1020s] N: 
[ 1020s] N:   The desktop entry specifies a Command that does not match any of the
[ 1020s] N:   executables shipped in the package.
[ 1020s] N:   
[ 1020s] N:   This condition is often caused by a typo, or the desktop file was not
[ 1020s] N:   updated after the installed path of the executable was modified.
[ 1020s] N:   
[ 1020s] N:   Packages should ship executables that are used as commands in desktop
[ 1020s] N:   files.
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: menu-format
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: dde-shell: link-to-shared-library-in-wrong-package usr/lib/aarch64-linux-gnu/libds-notification-shared.so.2.0.61 [usr/lib/aarch64-linux-gnu/libds-notification-shared.so]
[ 1020s] N: 
[ 1020s] N:   Although this package is not a "-dev" package, it installs a
[ 1020s] N:   "libsomething.so" symbolic link referencing the corresponding shared
[ 1020s] N:   library. When the link doesn't include the version number, it is used by
[ 1020s] N:   the linker when other programs are built against this shared library.
[ 1020s] N:   
[ 1020s] N:   Shared libraries are supposed to place such symbolic links in their
[ 1020s] N:   respective "-dev" packages, so it is a bug to include it with the main
[ 1020s] N:   library package.
[ 1020s] N:   
[ 1020s] N:   However, if this is a small package which includes the runtime and the
[ 1020s] N:   development libraries, this is not a bug. In the latter case, please
[ 1020s] N:   override this warning.
[ 1020s] N: 
[ 1020s] N:   Please refer to Development files (Section 8.4) in the Debian Policy
[ 1020s] N:   Manual for details.
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: libraries/shared/links
[ 1020s] N:   Renamed from: non-dev-pkg-with-shlib-symlink
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: dde-shell: no-manual-page [usr/bin/dde-shell]
[ 1020s] N: 
[ 1020s] N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin or /usr/games should have
[ 1020s] N:   a manual page
[ 1020s] N:   
[ 1020s] N:   Note that though the man program has the capability to check for several
[ 1020s] N:   program names in the NAMES section, each of these programs should have its
[ 1020s] N:   own manual page (a symbolic link to the appropriate manual page is
[ 1020s] N:   sufficient) because other manual page viewers such as xman or tkman don't
[ 1020s] N:   support this.
[ 1020s] N:   
[ 1020s] N:   If the name of the manual page differs from the binary by case, man may be
[ 1020s] N:   able to find it anyway; however, it is still best practice to match the
[ 1020s] N:   exact capitalization of the executable in the manual page.
[ 1020s] N:   
[ 1020s] N:   If the manual pages are provided by another package on which this package
[ 1020s] N:   depends, Lintian may not be able to determine that manual pages are
[ 1020s] N:   available. In this case, after confirming that all binaries do have manual
[ 1020s] N:   pages after this package and its dependencies are installed, please add a
[ 1020s] N:   Lintian override.
[ 1020s] N: 
[ 1020s] N:   Please refer to Manual pages (Section 12.1) in the Debian Policy Manual
[ 1020s] N:   for details.
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: documentation/manual
[ 1020s] N:   Renamed from: binary-without-manpage
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: dde-shell source: no-nmu-in-changelog [debian/changelog:1]
[ 1020s] N: 
[ 1020s] N:   When you NMU a package, that fact should be mentioned on the first line in
[ 1020s] N:   the changelog entry. Use the words "NMU" or "Non-maintainer upload" (case
[ 1020s] N:   insensitive).
[ 1020s] N:   
[ 1020s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[ 1020s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[ 1020s] N:   identical to the maintainer or one of the uploaders. If this is a local
[ 1020s] N:   package (not intended for Debian), you can suppress this warning by
[ 1020s] N:   putting "local" in the version number or "local package" on the first line
[ 1020s] N:   of the changelog entry.
[ 1020s] N: 
[ 1020s] N:   Please refer to Using the DELAYED/ queue (Section 5.11.3) in the Debian
[ 1020s] N:   Developer's Reference for details.
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: nmu
[ 1020s] N:   Renamed from: changelog-should-mention-nmu
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: dde-shell: package-name-doesnt-match-sonames libds-notification-shared2
[ 1020s] N: 
[ 1020s] N:   The package name of a library package should usually reflect the soname of
[ 1020s] N:   the included library. The package name can determined from the library
[ 1020s] N:   file name with the following code snippet:
[ 1020s] N:   
[ 1020s] N:    $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
[ 1020s] N:        sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: libraries/shared/soname
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: libdde-shell: package-name-doesnt-match-sonames libdde-shell1
[ 1020s] N:
[ 1020s] W: libdde-shell-dock: package-name-doesnt-match-sonames libdde-shell-dock1
[ 1020s] N:
[ 1020s] W: dde-shell source: source-nmu-has-incorrect-version-number 2.0.61+u065 [debian/changelog:1]
[ 1020s] N: 
[ 1020s] N:   A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
[ 1020s] N:   native package). This is to prevent stealing version numbers from the
[ 1020s] N:   maintainer.
[ 1020s] N:   
[ 1020s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[ 1020s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[ 1020s] N:   identical to the maintainer or one of the uploaders. If this is a local
[ 1020s] N:   package (not intended for Debian), you can suppress this warning by
[ 1020s] N:   putting "local" in the version number or "local package" on the first line
[ 1020s] N:   of the changelog entry.
[ 1020s] N: 
[ 1020s] N:   Please refer to NMUs and debian/changelog (Section 5.11.2) in the Debian
[ 1020s] N:   Developer's Reference for details.
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: nmu
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: dde-shell: unknown-section DDE
[ 1020s] N: 
[ 1020s] N:   The "Section:" field in this package's control file is not one of the
[ 1020s] N:   sections in use on the ftp archive. Valid sections are currently admin,
[ 1020s] N:   comm, cli-mono, database, debug, devel, doc, editors, electronics,
[ 1020s] N:   embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio,
[ 1020s] N:   haskell, httpd, interpreters, java, javascript, kde, libdevel, libs, lisp,
[ 1020s] N:   localization, kernel, mail, math, misc, net, news, ocaml, oldlibs,
[ 1020s] N:   otherosfs, perl, php, python, ruby, rust, science, shells, sound, tex,
[ 1020s] N:   text, utils, vcs, video, web, x11, xfce, zope.
[ 1020s] N:   
[ 1020s] N:   The section name should be preceded by either "contrib/", "non-free/" or
[ 1020s] N:   "non-free-firmware/" if the package is in the according archive area.
[ 1020s] N: 
[ 1020s] N:   Please refer to Sections (Section 2.4) in the Debian Policy Manual for
[ 1020s] N:   details.
[ 1020s] N: 
[ 1020s] N:   Visibility: warning
[ 1020s] N:   Show-Always: no
[ 1020s] N:   Check: fields/section
[ 1020s] N: 
[ 1020s] N:
[ 1020s] W: dde-shell-example: unknown-section DDE
[ 1020s] N:
[ 1020s] W: libdde-shell: unknown-section DDE
[ 1020s] N:
[ 1020s] W: libdde-shell-dev: unknown-section DDE
[ 1020s] N:
[ 1020s] W: libdde-shell-dock: unknown-section DDE
[ 1020s] N:
[ 1020s] W: libdde-shell-dock-dev: unknown-section DDE
[ 1021s] Warning: mkbaselibs missing in build root, skipping baselibs
deepin_develop / x86_64 (Lintian 警告: 15 条)
[  638s] W: dde-shell: desktop-command-not-in-package bin/false [usr/share/applications/org.deepin.dde-shell.desktop]
[  638s] N: 
[  638s] N:   The desktop entry specifies a Command that does not match any of the
[  638s] N:   executables shipped in the package.
[  638s] N:   
[  638s] N:   This condition is often caused by a typo, or the desktop file was not
[  638s] N:   updated after the installed path of the executable was modified.
[  638s] N:   
[  638s] N:   Packages should ship executables that are used as commands in desktop
[  638s] N:   files.
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: menu-format
[  638s] N: 
[  638s] N:
[  638s] W: dde-shell: link-to-shared-library-in-wrong-package usr/lib/x86_64-linux-gnu/libds-notification-shared.so.2.0.61 [usr/lib/x86_64-linux-gnu/libds-notification-shared.so]
[  638s] N: 
[  638s] N:   Although this package is not a "-dev" package, it installs a
[  638s] N:   "libsomething.so" symbolic link referencing the corresponding shared
[  638s] N:   library. When the link doesn't include the version number, it is used by
[  638s] N:   the linker when other programs are built against this shared library.
[  638s] N:   
[  638s] N:   Shared libraries are supposed to place such symbolic links in their
[  638s] N:   respective "-dev" packages, so it is a bug to include it with the main
[  638s] N:   library package.
[  638s] N:   
[  638s] N:   However, if this is a small package which includes the runtime and the
[  638s] N:   development libraries, this is not a bug. In the latter case, please
[  638s] N:   override this warning.
[  638s] N: 
[  638s] N:   Please refer to Development files (Section 8.4) in the Debian Policy
[  638s] N:   Manual for details.
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: libraries/shared/links
[  638s] N:   Renamed from: non-dev-pkg-with-shlib-symlink
[  638s] N: 
[  638s] N:
[  638s] W: dde-shell: no-manual-page [usr/bin/dde-shell]
[  638s] N: 
[  638s] N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin or /usr/games should have
[  638s] N:   a manual page
[  638s] N:   
[  638s] N:   Note that though the man program has the capability to check for several
[  638s] N:   program names in the NAMES section, each of these programs should have its
[  638s] N:   own manual page (a symbolic link to the appropriate manual page is
[  638s] N:   sufficient) because other manual page viewers such as xman or tkman don't
[  638s] N:   support this.
[  638s] N:   
[  638s] N:   If the name of the manual page differs from the binary by case, man may be
[  638s] N:   able to find it anyway; however, it is still best practice to match the
[  638s] N:   exact capitalization of the executable in the manual page.
[  638s] N:   
[  638s] N:   If the manual pages are provided by another package on which this package
[  638s] N:   depends, Lintian may not be able to determine that manual pages are
[  638s] N:   available. In this case, after confirming that all binaries do have manual
[  638s] N:   pages after this package and its dependencies are installed, please add a
[  638s] N:   Lintian override.
[  638s] N: 
[  638s] N:   Please refer to Manual pages (Section 12.1) in the Debian Policy Manual
[  638s] N:   for details.
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: documentation/manual
[  638s] N:   Renamed from: binary-without-manpage
[  638s] N: 
[  638s] N:
[  638s] W: dde-shell source: no-nmu-in-changelog [debian/changelog:1]
[  638s] N: 
[  638s] N:   When you NMU a package, that fact should be mentioned on the first line in
[  638s] N:   the changelog entry. Use the words "NMU" or "Non-maintainer upload" (case
[  638s] N:   insensitive).
[  638s] N:   
[  638s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  638s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  638s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  638s] N:   package (not intended for Debian), you can suppress this warning by
[  638s] N:   putting "local" in the version number or "local package" on the first line
[  638s] N:   of the changelog entry.
[  638s] N: 
[  638s] N:   Please refer to Using the DELAYED/ queue (Section 5.11.3) in the Debian
[  638s] N:   Developer's Reference for details.
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: nmu
[  638s] N:   Renamed from: changelog-should-mention-nmu
[  638s] N: 
[  638s] N:
[  638s] W: dde-shell: package-name-doesnt-match-sonames libds-notification-shared2
[  638s] N: 
[  638s] N:   The package name of a library package should usually reflect the soname of
[  638s] N:   the included library. The package name can determined from the library
[  638s] N:   file name with the following code snippet:
[  638s] N:   
[  638s] N:    $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
[  638s] N:        sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: libraries/shared/soname
[  638s] N: 
[  638s] N:
[  638s] W: libdde-shell: package-name-doesnt-match-sonames libdde-shell1
[  638s] N:
[  638s] W: libdde-shell-dock: package-name-doesnt-match-sonames libdde-shell-dock1
[  638s] N:
[  638s] W: dde-shell source: source-nmu-has-incorrect-version-number 2.0.61+u065 [debian/changelog:1]
[  638s] N: 
[  638s] N:   A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
[  638s] N:   native package). This is to prevent stealing version numbers from the
[  638s] N:   maintainer.
[  638s] N:   
[  638s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  638s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  638s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  638s] N:   package (not intended for Debian), you can suppress this warning by
[  638s] N:   putting "local" in the version number or "local package" on the first line
[  638s] N:   of the changelog entry.
[  638s] N: 
[  638s] N:   Please refer to NMUs and debian/changelog (Section 5.11.2) in the Debian
[  638s] N:   Developer's Reference for details.
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: nmu
[  638s] N: 
[  638s] N:
[  638s] W: dde-shell: unknown-section DDE
[  638s] N: 
[  638s] N:   The "Section:" field in this package's control file is not one of the
[  638s] N:   sections in use on the ftp archive. Valid sections are currently admin,
[  638s] N:   comm, cli-mono, database, debug, devel, doc, editors, electronics,
[  638s] N:   embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio,
[  638s] N:   haskell, httpd, interpreters, java, javascript, kde, libdevel, libs, lisp,
[  638s] N:   localization, kernel, mail, math, misc, net, news, ocaml, oldlibs,
[  638s] N:   otherosfs, perl, php, python, ruby, rust, science, shells, sound, tex,
[  638s] N:   text, utils, vcs, video, web, x11, xfce, zope.
[  638s] N:   
[  638s] N:   The section name should be preceded by either "contrib/", "non-free/" or
[  638s] N:   "non-free-firmware/" if the package is in the according archive area.
[  638s] N: 
[  638s] N:   Please refer to Sections (Section 2.4) in the Debian Policy Manual for
[  638s] N:   details.
[  638s] N: 
[  638s] N:   Visibility: warning
[  638s] N:   Show-Always: no
[  638s] N:   Check: fields/section
[  638s] N: 
[  638s] N:
[  638s] W: dde-shell-example: unknown-section DDE
[  638s] N:
[  638s] W: libdde-shell: unknown-section DDE
[  638s] N:
[  638s] W: libdde-shell-dev: unknown-section DDE
[  638s] N:
[  638s] W: libdde-shell-dock: unknown-section DDE
[  638s] N:
[  638s] W: libdde-shell-dock-dev: unknown-section DDE
[  638s] Warning: mkbaselibs missing in build root, skipping baselibs

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.

2 participants