mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 06:09:56 +08:00
window delegate modify for onBeforeClose hook
This commit is contained in:
parent
fda3323386
commit
92b63d9fad
@ -12,16 +12,15 @@
|
|||||||
#import "WailsContext.h"
|
#import "WailsContext.h"
|
||||||
|
|
||||||
@implementation WindowDelegate
|
@implementation WindowDelegate
|
||||||
|
|
||||||
- (BOOL)windowShouldClose:(WailsWindow *)sender {
|
- (BOOL)windowShouldClose:(WailsWindow *)sender {
|
||||||
[sender orderOut:nil];
|
if( self.hideOnClose ) {
|
||||||
if( self.hideOnClose == false ) {
|
[NSApp hide:nil];
|
||||||
processMessage("Q");
|
return false;
|
||||||
}
|
}
|
||||||
return !self.hideOnClose;
|
processMessage("Q");
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (void)windowDidExitFullScreen:(NSNotification *)notification {
|
- (void)windowDidExitFullScreen:(NSNotification *)notification {
|
||||||
[self.ctx.mainWindow applyWindowConstraints];
|
[self.ctx.mainWindow applyWindowConstraints];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user