diff --git a/CHANGELOG.md b/CHANGELOG.md index 7897f51..7588b91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- **Windows:** Quit now exits the process. If the Settings window had been opened, the app could hang on Quit with the CursorFollow Output window still up ([#5](https://github.com/LoganRupe/CursorFollow/issues/5)). + ## 0.5.1 First public release of **CursorFollow**, open source under the MIT License at [github.com/LoganRupe/CursorFollow](https://github.com/LoganRupe/CursorFollow). Runs on **macOS**, **Windows** and **Linux (Hyprland)**. diff --git a/CursorFollowWin/App.xaml.cs b/CursorFollowWin/App.xaml.cs index e531556..bb33486 100644 --- a/CursorFollowWin/App.xaml.cs +++ b/CursorFollowWin/App.xaml.cs @@ -169,6 +169,13 @@ private void ExitApplication() _outputWindow?.DisposeCapture(); _singleInstanceMutex?.Dispose(); AppLog.Shutdown(); + + // Close every window ourselves rather than relying on Application.Exit to do it. With the + // Settings window open (three windows), Exit closed only some of them and returned; the + // window it skipped kept the message loop, and so the process, alive (issue #5). + _settingsWindow?.Close(); + _panelWindow?.Close(); + _outputWindow?.Close(); Current.Exit(); }