fix(ui): Shutdown terminates the app even with secondary windows open

ShutdownWorkerAndCloseApp only closed MainWindow via CloseWindow, relying
on ShutdownMode.OnMainWindowClose to bring the process down. That mode
backs off if any window cancels its own Closing event, and
MissionControlWindow always does (it hides instead of closing) - so the
process never actually exited while Mission Control, Cheat Sheets, or the
diff viewer were still open. Call IClassicDesktopStyleApplicationLifetime
.Shutdown() directly, which force-closes every window regardless of
per-window cancellation.
This commit is contained in:
Mika Kuns
2026-09-16 15:43:36 +02:00
committed by mika kuns
parent 7ecb1fa0b5
commit 103eb9a687
2 changed files with 10 additions and 10 deletions
@@ -80,11 +80,6 @@ public partial class MainWindow : Window
WindowState = WindowState.Normal;
Activate();
};
vm.CloseWindow = () =>
{
_forceClose = true;
Close();
};
if (vm.Tasks is not null)
vm.Tasks.IsWindowVisible = WindowState != WindowState.Minimized;
}