Repository navigation
fix: disconnect the settings handlers when Forge is disabled - #582
Open
mattchristenson wants to merge 2 commits into
Open
mattchristenson wants to merge 2 commits into
mattchristenson wants to merge 2 commits into
Conversation
The window manager and the quick settings indicator connected "changed"
handlers to Forge's settings and never disconnected them. After Forge was
disabled (as on the lock screen), every settings change still ran them, and
they failed on the settings the extension had dropped ("this.ext.settings is
null"); after enabling again, the old handlers kept running next to the new
ones. Keep the handler ids and disconnect them in _removeSignals() and when the
indicator is destroyed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A window that is closing has left the window list, but its actor keeps
Forge's destroy handler and borders until the close animation ends.
_removeSignals() only went over the listed windows, so when Forge was
disabled during a close animation, windowDestroy() still ran afterwards
and queued a render, which failed on the settings Forge had dropped
("this.ext.settings is null").
Keep the actors Forge connected to in a set and release them all.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #581.
Change.
WindowManagerkeeps the id of its settings handler and disconnects it in_removeSignals(), which runs on disable.FeatureIndicatorkeeps its handler id and disconnects it indestroy().destroyhandler and borders until the close animation ends._removeSignals()only went over the listed windows, sowindowDestroy()still ran afterdisable()and queued a render, which failed with the same error.WindowManagernow keeps the actors it connected to in a set and releases all of them.Testing. Scenario
scenarios/29_settings_after_disable.py:mainthat gives 4 JS errors (this.ext.settings is null); with this PR, none;mainthat gives 1 JS error; with this PR, none.With this PR:
main1/3 → 3/3. The rest of the suite (scenarios 01–28, run again with both commits) gives the same results as onmain; the only differences were checks whose results vary between runs onmainitself (3.4, a key-repeat resize; 23.1, #268; scenario 07, where VS Code didn't open in time).prettier@2.7.1 --checkis clean.🤖 Generated with Claude Code