systray: fix icon loss on redisplay, timeout races, and teardown errors - #13966
Open
zquestz wants to merge 1 commit into
Open
systray: fix icon loss on redisplay, timeout races, and teardown errors#13966zquestz wants to merge 1 commit into
zquestz wants to merge 1 commit into
Conversation
…rs in the applet and tray manager
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.
Follow-up to the xapp-status applet hardening PR; this covers the XEmbed
side of the tray. Two files, four fixes, each with a concrete trigger.
Never-plugged icons were permanently lost on redisplay
(cinnamon-tray-manager.c).
cinnamon_tray_manager_child_redisplay()calledon_plug_added()for every child, including sockets whose plug had notarrived yet. For those, it created a CinnamonTrayIcon for an unplugged
window and emitted tray-icon-added for it, and worse, disconnected the
pending plug-added handler, so the real icon could never appear once the
app finished embedding. Redisplay runs on icon size changes, panel edit
mode, UI scale changes, role registration, and applet reload, so any
slow-embedding client was exposed. Skip children with no actor and leave
their plug-added handler in place.
TypeError on removal of hidden-role icons (systray applet). Icons whose
role is claimed by an applet (nm-applet with the network applet loaded, for
example) never get a button, so
icon.get_parent()is null in_onTrayIconRemoved()and the handler threw on every such removal.Races in the 1-second delayed-show timeout (systray applet). The
timeout in
_onTrayIconAdded()was untracked. If the icon was removed or aredisplay ran within that second, the surviving callback could call
button.destroy()on an already-destroyed button, or animate an orphanedicon. The source id is now stored on the button and cancelled from both
_clearIcons()and_onTrayIconRemoved().Teardown cleanups.
cinnamon_tray_manager_redisplay()and_set_orientation()now tolerate the released-resources state afterx11-display-closing instead of hitting g_return_if_fail criticals, and the
applet cancels its pending ui-scale debounce timer when removed from the
panel.
No behavior change for icons that embed promptly and clients that exit
cleanly.