Repository navigation
fix(ui): quit when the last kagan window closes, even with a plugin loaded - #151
Merged
Merged
Conversation
A plugin that loads before the main window opens got window 0 in kg ui, because every open window was numbered. kg ui now numbers only kagan's own windows: the main window and the About window. The regression test loads a status plugin first and checks that window 0 is the main window.
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.
Why
On Windows and Linux, closing the last kagan window should quit kagan (PR #143).
quit.rscheckedcx.windows().is_empty(), but every loaded plugin keeps its own window (activation.rs) until the plugin is deactivated. With any plugin loaded, the list was never empty, so closing the main window left kagan running with no window. Same cause as #150: a plugin's window counted as kagan's.What
kagan_windowsmoves fromui_driver.rstokagan/window.rs;kg uiand quit both ask it.none_left(cx); only the quit call itself stays platform-gated.a_plugin_window_alone_leaves_no_kagan_window); it fails without the fix.