Browse Source
Merge pull request #5648 from AvaloniaUI/fixes/osx-cancelling-app-quit
OSX backend when quiting app (closeAll) should only performClose
pull/5663/head
Dan Walmsley
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
-
native/Avalonia.Native/src/OSX/window.mm
|
|
|
@ -1877,7 +1877,12 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
|
|
|
|
|
for(int i = 0; i < numWindows; i++) |
|
|
|
{ |
|
|
|
[[windows objectAtIndex:i] performClose:nil]; |
|
|
|
auto window = (AvnWindow*)[windows objectAtIndex:i]; |
|
|
|
|
|
|
|
if([window parentWindow] == nullptr) // Avalonia will handle the child windows. |
|
|
|
{ |
|
|
|
[window performClose:nil]; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|