Skip to content

Legacy tray tooltip leaves empty background because popup destruction is not forwarded #13616

Open
linuxdeepin/dde-shell
#1663

Description

@svan71

Upstream report draft

Title

Legacy tray tooltip leaves empty background because popup destruction is not
forwarded to TrayItemSurfacePopup

Project

linuxdeepin/dde-shell

Reproduction

  1. Run DDE with the current dock.
  2. Hover a legacy tray plugin such as Volume or Clipboard until its tooltip is
    visible.
  3. Move the pointer straight down off the item.

The plugin tooltip content disappears, but the shared translucent tooltip
background remains. Native dock actions such as Quick Actions and Collapse
Tray dismiss correctly. The problem reproduces under both X11 and Wayland on
Arch DDE; genuine Deepin's current runtime does not visibly reproduce it.

Root cause

End-to-end logging shows the tray loader receives leaveEvent, hides its
tooltip QWidget/QWindow, removes the popup-map entry, and destroys
PluginPopupSurface. The server-side PluginPopup emits aboutToDestroy and
is deleted. TrayItemSurfacePopup.qml, however, closes its PanelToolTip only
from ShellSurfaceItemProxy.onSurfaceDestroyed, and that callback does not fire
for this popup teardown. The plugin-owned content disappears while the
shell-owned host remains visible.

Fix

Connect the authoritative popup lifecycle signal directly:

Connections {
    target: toolTip.shellSurface
    function onAboutToDestroy() {
        toolTip.close()
    }
}

This was built against dde-shell 2.0.50 and live-tested with Volume and
Clipboard. A clean package containing only this behavioral change fixes the
straight-down exit; native tooltips continue to work.

Historical context

  • 24b446f34d0656fbaec591e7df685c5ea9fc2e92 introduced
    TrayItemSurfacePopup.qml and its onSurfaceDestroyed dependency.
  • 25d9d302c50c721704fd0610e5ccc6499b63a903 later added
    PluginPopup.aboutToDestroy; ShellSurfaceItemProxy uses it to reset the
    embedded surface but does not forward it as surfaceDestroyed.

The direct connection above closes the lifecycle gap without changing popup
creation, positioning, rendering, or native dock actions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions