5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 05:00:31 +08:00

window delegate modify for onBeforeClose hook

This commit is contained in:
ironpark 2021-12-04 07:52:34 +09:00
parent fda3323386
commit 92b63d9fad

View File

@ -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];
}