Browse Source

Enforce window order after a delay.

Sometimes, after `windowDidBecomeKey` is called and the window order is enforced via `BringToFront`, the window that became key is then moved to the front, breaking window order. Given that we're already invalidating the shadow by scheduling it on the dispatcher, use this opportunity to also enforce the window order again.
pull/10427/head
Steven Kirk 4 years ago
parent
commit
e77c79b2aa
  1. 5
      native/Avalonia.Native/src/OSX/AvnWindow.mm

5
native/Avalonia.Native/src/OSX/AvnWindow.mm

@ -292,12 +292,13 @@
{ {
if (_parent == nullptr) if (_parent == nullptr)
return; return;
_parent->BringToFront(); _parent->BringToFront();
dispatch_async(dispatch_get_main_queue(), ^{ dispatch_async(dispatch_get_main_queue(), ^{
@try { @try {
[self invalidateShadow]; [self invalidateShadow];
self->_parent->BringToFront();
} }
@finally{ @finally{
} }

Loading…
Cancel
Save