Skip to content

Fix an unmounted volume's name staying on screen after its icon is removed - #360

Open
svan71 wants to merge 1 commit into
icedman:mainfrom
svan71:fix-stale-mount-label
Open

Fix an unmounted volume's name staying on screen after its icon is removed#360
svan71 wants to merge 1 commit into
icedman:mainfrom
svan71:fix-stale-mount-label

Conversation

@svan71

@svan71 svan71 commented Jul 30, 2026

Copy link
Copy Markdown

Unmounting a volume from its dock icon's Unmount action removes the icon but leaves the volume's name floating over the desktop for the rest of the session.

Cause

The mount reconciler drops a stale icon with this._extraIcons.remove_child(extra), which unparents the item without destroying it.

DashItemContainer's label is parented to the chrome, not to the item, so unparenting the item does not take the label with it. _cleanupIcon() is the existing teardown that unparents the label and drops the item's menu actor from Main.uiGroup, but it only runs from the icon's destroy handler — and unparenting never fires destroy.

The item also leaves _icons, so the animator stops resetting _label.opacity. Reaching the Unmount action means hovering the icon, which had already raised the label to 255, and there it stays.

Fix

Call the existing _cleanupIcon() and then destroy the item, instead of only unparenting it.

Verification

On GNOME 50, mounting and unmounting a loop-device volume in a nested headless shell runs the removal path with no JS errors and no Clutter criticals. Before the change the label persisted on screen after the icon was gone; after it, it goes with the icon.

The mount reconciler dropped a stale icon with _extraIcons.remove_child(),
which unparents the item without destroying it. DashItemContainer's label is
parented to the chrome rather than to the item, and _cleanupIcon() - which
unparents that label and drops the item's menu actor from Main.uiGroup - only
ever runs from the icon's 'destroy' handler. Unparenting never fires it, so the
label was left in the chrome, and since the item was no longer in _icons the
animator never reset its opacity either. Hovering a mount icon to reach its
Unmount action therefore left the volume's name floating over the desktop for
the rest of the session.
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.

1 participant