diff --git a/v2/internal/frontend/desktop/darwin/WindowDelegate.m b/v2/internal/frontend/desktop/darwin/WindowDelegate.m index aca68688f..cf22e0f5a 100644 --- a/v2/internal/frontend/desktop/darwin/WindowDelegate.m +++ b/v2/internal/frontend/desktop/darwin/WindowDelegate.m @@ -12,16 +12,15 @@ #import "WailsContext.h" @implementation WindowDelegate - - (BOOL)windowShouldClose:(WailsWindow *)sender { - [sender orderOut:nil]; - if( self.hideOnClose == false ) { - processMessage("Q"); + if( self.hideOnClose ) { + [NSApp hide:nil]; + return false; } - return !self.hideOnClose; + processMessage("Q"); + return false; } - - (void)windowDidExitFullScreen:(NSNotification *)notification { [self.ctx.mainWindow applyWindowConstraints]; }