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:
parent
fda3323386
commit
92b63d9fad
@ -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];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user