--- a/ui/cocoa/WindowManager.m Sat Jun 06 18:08:51 2026 +0200 +++ b/ui/cocoa/WindowManager.m Sat Jun 06 18:37:04 2026 +0200 @@ -27,6 +27,7 @@ */ #import "WindowManager.h" +#import "MainWindow.h" @implementation WindowManager @@ -52,4 +53,13 @@ [_windows removeObject:win.windowController]; } +- (void)shutdown { + if(_windows.count > 0) { + NSWindowController *controller = _windows.firstObject; + MainWindow *win = (MainWindow*)controller.window; + [win saveWindowSize]; + } + [_windows removeAllObjects]; +} + @end