fix: alt-tab race condition and signal handler leak#523
Open
toabctl wants to merge 2 commits into
Open
Conversation
show() can synchronously destroy the popup when the modifier key was already released before the grab completed (GNOME#596695). This leaves _switcherList and _items disposed, causing errors on every fast alt-tab: Object Gjs_ui_altTab_WindowIcon has been already disposed Object St.BoxLayout has been already disposed clutter_actor_add_child: assertion 'child->priv->parent == NULL' failed Can't update stage views actor unnamed [ClutterActor] is on because it needs an allocation
MetaWindowGroup connects an 'unmanaged' signal handler to each window but never stores the signal IDs and never disconnects them. Every alt-tab invocation leaks handlers for the lifetime of the shell process, and the stale onAllWindowsUnmanaged callback can fire into a destroyed switcher list. Store signal IDs from connect(), add a destroy() method that disconnects them, and call it from MultipleWindowsIcon's destroy signal so cleanup happens when the popup tears down.
Author
|
@domferr could you have a look please? |
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.
Fix two issues in the alt-tab override:
Guard against the popup being synchronously destroyed during
show()when the modifier key is released before the grab completes (GNOME#596695). This prevents hundreds of "already disposed" andclutter_actor_add_childassertion errors on every fast alt-tab.Store and disconnect
unmanagedsignal handlers inMetaWindowGroupso they don't leak for the lifetime of the shell process.