fix: close all floating windows when main window closes#1920
Merged
ten9876 merged 1 commit intoten9876:mainfrom Apr 25, 2026
Merged
fix: close all floating windows when main window closes#1920ten9876 merged 1 commit intoten9876:mainfrom
ten9876 merged 1 commit intoten9876:mainfrom
Conversation
Closing the main window left popped-out panadapter and applet windows alive, keeping the Qt event loop running. The app only exited when the user manually closed a floating pan window. Root cause: PanadapterStack::prepareShutdown() set the shutdown flag and saved geometry on each PanFloatingWindow but never called close(). Those windows are top-level widgets with WA_QuitOnClose=true (Qt default), so they kept the app alive. FloatingContainerWindow (applet containers) had no shutdown guard, so its closeEvent would emit dockRequested into an already-torn-down panel during teardown. Changes: PanadapterStack::prepareShutdown(): call fw->close() after setting the shutdown flag so floating pan windows are actually dismissed. FloatingContainerWindow: add m_shuttingDown member and prepareShutdown() method that flushes geometry, sets the flag, and calls close(). closeEvent() now short-circuits on the flag instead of emitting dockRequested when the panel is gone. ContainerManager: add prepareShutdown() that calls prepareShutdown() on each FloatingContainerWindow and clears the floating windows map. MainWindow::closeEvent(): call m_appletPanel->containerManager()-> prepareShutdown() alongside the existing m_panStack->prepareShutdown() call so all floating applet containers are closed cleanly before settings are saved and the radio disconnects.
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.
Closing the main window left popped-out panadapter and applet windows alive, keeping the Qt event loop running. The app only exited when the user manually closed a floating pan window.
Root cause: PanadapterStack::prepareShutdown() set the shutdown flag and saved geometry on each PanFloatingWindow but never called close(). Those windows are top-level widgets with WA_QuitOnClose=true (Qt default), so they kept the app alive. FloatingContainerWindow (applet containers) had no shutdown guard, so its closeEvent would emit dockRequested into an already-torn-down panel during teardown.
Changes:
PanadapterStack::prepareShutdown(): call fw->close() after setting the shutdown flag so floating pan windows are actually dismissed.
FloatingContainerWindow: add m_shuttingDown member and prepareShutdown() method that flushes geometry, sets the flag, and calls close(). closeEvent() now short-circuits on the flag instead of emitting dockRequested when the panel is gone.
ContainerManager: add prepareShutdown() that calls prepareShutdown() on each FloatingContainerWindow and clears the floating windows map.
MainWindow::closeEvent(): call m_appletPanel->containerManager()->
prepareShutdown() alongside the existing m_panStack->prepareShutdown() call so all floating applet containers are closed cleanly before settings are saved and the radio disconnects.