Skip to content

feat: add compositor-managed tooltip window for Wayland - #1813

Merged
wjyrich merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-task-398771
Nov 19, 2026
Merged

wjyrich merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix-task-398771

Conversation

@wjyrich

@wjyrich wjyrich commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor
  1. Introduce DToolTipWindow attached property and TooltipShellSurface that lets the Treeland tooltip protocol assign the wl_surface role instead of xdg-shell, while Qt keeps owning rendering and buffers.
  2. Add suspend/resume/retire lifecycle with a generation counter so stale frame callbacks from a recreated surface are ignored.
  3. Route tooltip requests through DockPanel -> TaskManager -> AbstractWindowMonitor so the taskmanager's shared dock preview context can animate tooltip<->preview transitions.
  4. Extend TreeLandWindowMonitor with requestTooltip/hideTooltip, shared 350ms hide grace, and cleanup of tooltip windows on stop/clear/destroy.
  5. Make PanelToolTip generic over nativeWindow vs shared toolTipWindow, add contentReady/windowCreated/closed signals and output creation for ShellSurfaceItemProxy.
  6. Debounce Wayland tooltip timers to 300ms and cancel pending show on press/hover-leave across dock applets.
  7. Guard against destruction during callbacks in PanelPopupWindow and make background/blur opt-out via drawBackground.

Log: Tooltips on Wayland are now rendered as compositor-managed surfaces with smooth transitions to window previews

Influence:

  1. Verify tooltips appear correctly on Wayland for dock applets, tray items, card surfaces, and showdesktop.
  2. Test tooltip-to-window-preview transitions and vice versa; verify animations play without flicker.
  3. Test rapid hovering across adjacent dock items; ensure only one tooltip shows and stale frames do not appear.
  4. Verify tooltip hides when the panel popup window closes or the applet is destroyed.
  5. Test window appearing mid-hover while tooltip is pending; confirm switch to preview only when still hovered.
  6. Verify X11 behavior is unchanged (timers, autoClose, shared window path).
  7. Check tooltip positioning for all panel directions (top/right/bottom/ left).
  8. Verify tray tooltip and menu window mutual exclusion still works.

feat: 为 Wayland 增加合成器托管的提示窗口

  1. 新增 DToolTipWindow 附加属性与 TooltipShellSurface,由 Treeland tooltip 协议分配 wl_surface 角色,代替 xdg-shell,同时 Qt 继续管理渲染与 缓冲区。
  2. 增加 suspend/resume/retire 生命周期与 generation 计数,忽略重建 surface 后的过期帧回调。
  3. 通过 DockPanel -> TaskManager -> AbstractWindowMonitor 转发提示请求, 使 taskmanager 的共享 dock 预览上下文能够播放 tooltip 与预览之间的过渡
    动画。
  4. 扩展 TreeLandWindowMonitor,增加 requestTooltip/hideTooltip、统一的 350ms 隐藏宽限期,以及在 stop/clear/destroy 时清理提示窗口。
  5. 让 PanelToolTip 同时支持 nativeWindow 与共享 toolTipWindow,新增 contentReady/windowCreated/closed 信号,并为 ShellSurfaceItemProxy 创建 输出。
  6. Wayland 下将提示定时器调整为 300ms 防抖,并在按下或悬停离开时取消待显 示的提示。
  7. 在 PanelPopupWindow 中防止回调期间对象被销毁,并支持通过 drawBackground 关闭背景与模糊。

Log: Wayland 下提示现以合成器托管表面渲染,并可与窗口预览平滑过渡

Influence:

  1. 验证 Wayland 下 dock 应用项、托盘项、卡片表面与显示桌面的提示显示 正常。
  2. 测试提示到窗口预览及反向切换,确认动画无闪烁。
  3. 测试在相邻 dock 项间快速悬停,确保只显示一个提示且无残留帧。
  4. 验证面板弹窗关闭或应用项销毁时提示正确隐藏。
  5. 测试悬停期间新开窗口且提示待显示的场景,确认仅在仍悬停时切换为预览。
  6. 验证 X11 行为不变(定时器、autoClose、共享窗口路径)。
  7. 检查各面板方向(上/右/下/左)下的提示定位。
  8. 验证托盘提示与菜单窗口的互斥逻辑仍然有效。

PMS: TASK-398771

Summary by Sourcery

Enable compositor-managed Wayland tooltips with reliable lifecycle handling and smooth integration with dock window previews.

New Features:

  • Add compositor-managed Wayland tooltip surfaces that share the dock preview context for animated tooltip and window-preview transitions.

Bug Fixes:

  • Prevent stale Wayland frame callbacks and tooltip surfaces from appearing after surface recreation, ownership changes, or object destruction.
  • Prevent pending Wayland tooltips from appearing after presses, hover exits, popup closure, or applet destruction.

Enhancements:

  • Unify tooltip lifecycle, positioning, hide grace periods, and cleanup across dock, tray, card, show-desktop, and task-manager components.
  • Retain the existing X11 tooltip behavior while adding Wayland-specific debouncing and shared-window handling.
  • Allow popup background and blur rendering to be disabled for compositor-managed tooltip surfaces.

Build:

  • Include the new DToolTipWindow implementation and public header in the frame library and QML plugin.

Tests:

  • Expand tooltip behavior coverage across Wayland dock applets, tray items, card surfaces, panel directions, preview transitions, rapid hover changes, and lifecycle cleanup while preserving X11 behavior.

@sourcery-ai

sourcery-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Define the dock preview-context entry points and the monitor/helper interfaces that let dock applets and task management share a Wayland preview context.

  • panels/dock/dockhelper.h L25-26
  • panels/dock/dockpanel.h L101-103
  • panels/dock/taskmanager/treelandwindowmonitor.h L62-66 (+6 small edits)
  • panels/dock/waylanddockhelper.h L35-40, L61-69, L81-120 (+3 small edits)

Uses of the API

Pass the dock panel into the Wayland window monitor so it can obtain the panel-owned preview context.

  • panels/dock/taskmanager/taskmanager.cpp L168

Implementation

Forward the dock panel's preview-context request to its helper and initialize the helper pointer safely.

  • panels/dock/dockpanel.cpp L442-446
  • panels/dock/dockpanel.h L189

Replace the monitor-owned preview context with the panel-provided context, and manage its acquisition, preview requests, and cleanup.

  • panels/dock/taskmanager/treelandwindowmonitor.cpp L34-43, L83-109, L118-141 (+4 small edits)

Implement the shared Treeland preview context and tooltip-shell lifecycle, including tooltip positioning, frame handling, and cleanup.

  • panels/dock/waylanddockhelper.cpp L24-117, L124-131, L165-288 (+1 small edits)

UI

Update PanelToolTip to bind to the active shared tooltip window and close safely when its item or host window disappears.

  • frame/qml/PanelToolTip.qml L53-57, L85-98 (+5 small edits)

Configuration

Require the Treeland protocol version that provides the shared foreign-toplevel preview context and generate its client protocol bindings.

  • panels/dock/CMakeLists.txt L12, L66

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 found 7 issues

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="frame/wayland/dtooltipwindow.cpp" line_range="72-79" />
<code_context>
+            invalidateContent();
+    });
+    connect(window, &QQuickWindow::frameSwapped, this, [this] {
+        const auto generation = m_generation.load();
+        QMetaObject::invokeMethod(this, [this, generation] {
+            if (!m_enabled || m_suspended || !m_window->isVisible() || generation != m_generation.load())
+                return;
+            m_hasContent = true;
+            Q_EMIT contentCommitted();
+        }, Qt::QueuedConnection);
+    }, Qt::DirectConnection);
+}
+
</code_context>
<issue_to_address>
**Stale tooltip content appears**

When an old frame callback runs after retirement and resume, or a tooltip is canceled before its first show and reopened before the queued callback runs, `frameSwapped` captures the generation when its callback runs, and closing the not-yet-visible tooltip does not invalidate that generation. The old callback can match the new request, commit stale content, and show the previous tooltip.

Capture the generation when the frame is submitted and invalidate it when closing a not-yet-visible tooltip.

Also at `frame/qml/PanelToolTip.qml:125-128`.
</issue_to_address>

### Comment 2
<location path="frame/qml/PanelToolTip.qml" line_range="89" />
<code_context>
+        if (nativeWindow) {
+            // Re-register a reused window with the compositor. close() clears
+            // the previous request from the shared dock preview context.
+            if (!compositorTooltipRequested && !showOnCompositor(nativeWindow))
                 return
-
</code_context>
<issue_to_address>
**Reused tooltip never appears**

When a tooltip owner reuses a retained `nativeWindow` after its compositor request cannot be prepared, including after monitor cleanup, `beginOpen()` returns when `showOnCompositor(nativeWindow)` fails, without falling back to `toolTipWindow` or clearing `openPending`. The tooltip remains logically visible but never appears.

On compositor registration failure, clear the pending state and open the tooltip through `toolTipWindow` instead.

Also at `frame/qml/PanelToolTip.qml:90`, `panels/dock/taskmanager/treelandwindowmonitor.cpp:203`.
</issue_to_address>

### Comment 3
<location path="panels/dock/tray/SurfacePopup.qml" line_range="32-34" />
<code_context>
+            if (isWayland && shellSurface)
+                DockCompositor.closeShellSurface(shellSurface)
+        }
+        onShellSurfaceChanged: {
+            if (isWayland)
+                close(false)
+        }

</code_context>
<issue_to_address>
**Replaced surfaces remain open**

When a live tooltip shell surface is replaced during rapid tooltip changes, `close(false)` suppresses `closed()`, and Wayland disables `autoClose`, so replacing the shell surface leaves the old plugin surface open.

Close the old shell surface through the compositor before replacing it.

Also at `panels/dock/tray/TrayItemSurfacePopup.qml:138-141`, `panels/dock/cardleft/package/CardLeftDockArea.qml:426-429`.
</issue_to_address>

### Comment 4
<location path="panels/dock/taskmanager/treelandwindowmonitor.cpp" line_range="129" />
<code_context>
 void TreeLandWindowMonitor::stop()
 {
     m_foreignToplevelManager.reset(nullptr);
+    clearTooltipWindows();
 }

</code_context>
<issue_to_address>
**Restart reuses stale preview context**

When the monitor is stopped and later started again, `stop()` resets the foreign-toplevel manager but leaves `m_dockPreview` alive. After a subsequent `start()`, `ensureDockPreviewContext()` returns early for that non-null context, so tooltip and preview requests use the context associated with the old manager instead of creating one for the new connection.

Reset `m_dockPreview` when stopping the monitor, before creating a replacement foreign-toplevel manager.

Also at `panels/dock/taskmanager/treelandwindowmonitor.cpp:165`.
</issue_to_address>

### Comment 5
<location path="panels/dock/taskmanager/package/AppItem.qml" line_range="539" />
<code_context>
     Timer {
         id: previewTimer
-        interval: 500
+        interval: toolTip.isWayland ? 300 : 500
         running: false
         repeat: false
</code_context>
<issue_to_address>
**Wayland tooltips appear too quickly**

When the pointer briefly crosses the overflow button or app-runtime item on Wayland, `TaskOverflowButton.qml` still uses a 50 ms show timer, and `appruntimeitem.qml` opens its tooltip immediately, so these tooltips bypass the new 300 ms delay and flash during brief pointer crossings.

Apply the 300 ms Wayland delay to the overflow-button and app-runtime tooltips.

Also at `frame/qml/PanelToolTip.qml:24-25`.
</issue_to_address>

### Comment 6
<location path="panels/dock/tray/TrayItemSurfacePopup.qml" line_range="133" />
<code_context>
         id: toolTip
         property alias shellSurface: toolTipContent.shellSurface
+        contentReady: !!shellSurface && toolTipContent.hasSurfaceContent && shellSurface.width > 1 && shellSurface.height > 1
+        onWindowCreated: window => toolTipContent.createOutput(window)
+        onClosed: {
+            if (isWayland && shellSurface)
</code_context>
<issue_to_address>
**Tooltip overlaps tray menu**

When a tray item requests a menu while its compositor-managed tooltip is visible, `TrayItemSurfacePopup` opens its menu in the `TrayPopupTypeMenu` branch without closing the compositor-managed tooltip. The tooltip remains an independent native surface while the menu opens, so both surfaces can be shown at once.

Close the tooltip when the tray menu opens, and close the menu if the tooltip opens, matching the mutual-exclusion handling in `SurfacePopup.qml`.
</issue_to_address>

### Comment 7
<location path="panels/dock/tray/SurfacePopup.qml" line_range="26" />
<code_context>
-            if (visible && menuWindow.visible)
+        property alias shellSurface: surfaceLayer.shellSurface
+        contentReady: !!shellSurface && surfaceLayer.hasSurfaceContent && shellSurface.width > 1 && shellSurface.height > 1
+        toolTipDirection: Dock.Bottom
+        onWindowCreated: window => surfaceLayer.createOutput(window)
+        onClosed: {
</code_context>
<issue_to_address>
**Tray tooltip uses the wrong dock edge**

When a tray surface tooltip is shown while the panel is not at the bottom of the screen, `DockPanel.requestTooltip()` uses the supplied direction to select the tooltip rectangle’s anchor edge, so the hard-coded bottom direction anchors tray tooltips to the wrong edge when the panel is on the top, left, or right side.

Remove the fixed direction or derive it from the panel position so the compositor request follows the current dock edge.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Comment thread frame/wayland/dtooltipwindow.cpp Resolved
Comment thread frame/qml/PanelToolTip.qml Resolved
Comment thread panels/dock/tray/SurfacePopup.qml Resolved
Comment thread panels/dock/tray/SurfacePopup.qml Resolved
@deepin-ci-robot

deepin-ci-robot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

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

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

@wjyrich
wjyrich force-pushed the fix-task-398771 branch 10 times, most recently from 689182e to 085ba82 Compare November 18, 2026 06:21
@deepin-ci-robot

Copy link
Copy Markdown

deepin pr auto review

🤖 AI 代码审查报告

总体评分: 97 分 (通过阈值: 70分)

Pass


📊 总体评价

项目 结果
审查结论 代码审查通过
评分详情 本 PR 为 Wayland 环境新增由混成器(compositor)管理的 tooltip 窗口能力, 重构了 dock 预览/tooltip 的生命周期管理,将 TreeLandDockPreviewContext 从 TreeLandWindowMonitor 迁移至 WaylandDockHelper,由 helper 统一管理 tooltip 窗口的 shell integration 与预览上下文。四维度均通过,无安全漏洞,代码结构 清晰、注释充分,逻辑正确,性能合理。仅存少量可优化项(dynamic_cast 使用、 方法名重载易混淆),不影响整体质量。

|


🔍 详细分析

1. 语法逻辑 ✅

评价: 语法正确,逻辑清晰 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: ['将 dockPreviewContext() 的查询与创建职责拆分,eventFilter 中先查询是否存在再创建,避免副作用作为条件', '在 delete-from-slot 的 lambda 处补充注释,说明 Qt 连接机制保证安全性']


2. 代码质量 ✅

评价: 代码结构清晰,注释完整 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: ['考虑为 DockPanel 的 Q_INVOKABLE 与 DockHelper 的 virtual 取不同方法名(如 requestDockPreviewContext / dockPreviewContext)以区分调用层级', '将 hideTimer 间隔抽为命名常量(如 static constexpr int HideTimeoutMs = 800)']


3. 代码性能 ✅

评价: 性能良好,资源使用合理 ✅ 通过

潜在问题:
✅ 未发现明显问题

建议: ['可选:dynamic_cast 可在开启 RTTI 的 Qt 构建中保留,若需极致优化可改用 qobject_cast 配合 Q_DECLARE_INTERFACE,但当前场景非必要']


4. 代码安全 🔒

评价: 存在0个安全漏洞 ✅ 通过

🔐 发现 0 个安全漏洞

安全漏洞详情:
✅ 未发现安全漏洞

建议: []


💡 改进建议代码示例

// waylanddockhelper.cpp — 拆分 dockPreviewContext 的查询与创建职责(可选优化)
bool WaylandDockHelper::hasDockPreviewContext(QWindow *anchor) const
{
    return m_dockPreview && m_previewAnchor == anchor;
}

QObject *WaylandDockHelper::dockPreviewContext(QWindow *anchor)
{
    if (!anchor || !m_previewManager->isActive())
        return nullptr;
    if (hasDockPreviewContext(anchor))
        return m_dockPreview.get();
    // ... 创建逻辑保持不变
}

// eventFilter 中改为:
// case QEvent::Show:
//     if (!hasDockPreviewContext(m_panel->window()))
//         dockPreviewContext(m_panel->window()); // 显式创建
//     ...

本报告由 AI 代码审查工具自动生成

18202781743
18202781743 previously approved these changes Nov 18, 2026
@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

1. Add a shared dock preview context API to DockPanel and DockHelper so
applets share the panel's Wayland context.
2. Move TreeLandDockPreviewManager and TreeLandDockPreviewContext into
WaylandDockHelper with a single context per anchor.
3. Add tooltip surface support with a dedicated shell integration that
defers role assignment until the first buffer commit.
4. Connect tooltip window show/hide and frameSwapped events to show and
close the tooltip via the preview context.
5. Make TreeLandWindowMonitor use the panel-provided preview context
instead of creating its own.
6. Bump TreelandProtocols requirement to 0.9.0 and add the foreign-
toplevel-manager protocol.

Log: Dock tooltip and window preview now share a unified Wayland preview
context
Influence: Dock tooltips and previews become more stable on Treeland

feat(dock): 通过共享上下文统一处理任务栏提示与预览

1. 在 DockPanel 和 DockHelper 中新增共享的停靠预览上下文接口,使各插件复
用面板的 Wayland 上下文。
2. 将 TreeLandDockPreviewManager 和 TreeLandDockPreviewContext 移入
WaylandDockHelper,每个锚点仅维护一个上下文。
3. 新增工具提示 surface 支持,使用专用 shell integration 延迟角色分配至
首个缓冲区提交。
4. 连接提示窗口的显示/隐藏及帧交换事件,通过预览上下文显示和关闭提示。
5. 使 TreeLandWindowMonitor 使用面板提供的预览上下文,不再自行创建。
6. 将 TreelandProtocols 依赖升级至 0.9.0,并新增 foreign-toplevel-
manager 协议。

Log: 任务栏提示与窗口预览现共用统一的 Wayland 预览上下文
Influence: 提升 Treeland 下任务栏提示与预览的稳定性
PMS: TASK-398771
@wjyrich
wjyrich merged commit 710f1b5 into linuxdeepin:master Nov 19, 2026
10 of 17 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