Browse Source

borderless windows will close.

pull/3849/head
Dan Walmsley 6 years ago
parent
commit
aadc2effe0
  1. 14
      native/Avalonia.Native/src/OSX/window.mm

14
native/Avalonia.Native/src/OSX/window.mm

@ -1273,6 +1273,20 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent
} }
} }
- (void)performClose:(id)sender
{
if([[self delegate] respondsToSelector:@selector(windowShouldClose:)])
{
if(![[self delegate] windowShouldClose:self]) return;
}
else if([self respondsToSelector:@selector(windowShouldClose:)])
{
if(![self windowShouldClose:self]) return;
}
[self close];
}
- (void)pollModalSession:(nonnull NSModalSession)session - (void)pollModalSession:(nonnull NSModalSession)session
{ {
auto response = [NSApp runModalSession:session]; auto response = [NSApp runModalSession:session];

Loading…
Cancel
Save