Skip to content

Commit

Permalink
Merge pull request #10427 from AvaloniaUI/fixes/macos-close-window-zo…
Browse files Browse the repository at this point in the history
…rder

macOS: Fix window order breaking when closing modal dialog
  • Loading branch information
danwalmsley authored and grokys committed Feb 24, 2023
1 parent a5f20fb commit 8096b59
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions native/Avalonia.Native/src/OSX/AvnWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,14 @@ - (void)windowDidBecomeKey:(NSNotification *_Nonnull)notification
{
if (_parent == nullptr)
return;

_parent->BringToFront();

dispatch_async(dispatch_get_main_queue(), ^{
@try {
[self invalidateShadow];
[self invalidateShadow];
if (self->_parent != nullptr)
self->_parent->BringToFront();
}
@finally{
}
Expand Down

0 comments on commit 8096b59

Please sign in to comment.