Repository navigation
fix(win/app): close every window before Application.Exit so Quit exits - #6
Merged
Merged
Conversation
With the Settings window open, Application.Exit closed only some of the three windows and returned. The window it skipped (the output window in one run, Settings in another) never got a close, so the WinUI message loop kept running and the process stayed alive. A trace of Closed events showed Exit never touched the surviving window. ExitApplication now closes Settings, the panel and the output window itself, then calls Exit. Not a regression from the self-contained publish: the framework-dependent Debug build hangs the same way. Fixes #5
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.
What and why
Quit from the tray panel could leave the process running with the CursorFollow Output window still up. Fixes #5.
It happens once the Settings window has been opened.
Application.Exit()then closed only some of the app's three windows and returned. The window it skipped (output in one run, Settings in another) kept the WinUI message loop going. Evidence from the hung process:FrameworkApplication::RunDesktopWindowMessageLoop→GetMessageW, so nothing is blocked. The loop just never quits.Closedevent: panel and Settings closed,Exit()returned, and the output window never got a close.ExitApplicationnow closes Settings, the panel and the output window itself before callingExit(). No forcedEnvironment.Exit.Not a regression from #4. The framework-dependent Debug build (
dotnet build) hangs the same way.Platforms
Windows testing was scripted (tray click → select target → Resume → optional Settings → Quit → confirm) with a capture running at ~30 fps:
dotnet test tests/CursorFollowWin.Tests: 20/20 passed.Checklist
CHANGELOG.mdupdated under Unreleased (if user-visible)