mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
window delegate modify for onBeforeClose hook
This commit is contained in:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user