Fix an unmounted volume's name staying on screen after its icon is removed - #360
Open
svan71 wants to merge 1 commit into
Open
Fix an unmounted volume's name staying on screen after its icon is removed#360svan71 wants to merge 1 commit into
svan71 wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fromMain.uiGroup, but it only runs from the icon'sdestroyhandler — and unparenting never firesdestroy.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.