Browse Source

Manually restore parent windows before showing child.

pull/6407/head
Steven Kirk 5 years ago
parent
commit
24c8af1b62
  1. 6
      native/Avalonia.Native/src/OSX/window.mm

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

@ -713,6 +713,12 @@ private:
if(cparent == nullptr)
return E_INVALIDARG;
// If one tries to show a child window with a minimized parent window, then the parent window will be
// restored but MacOS isn't kind enough to *tell* us that, so the window will be left in a non-interactive
// state. Detect this and explicitly restore the parent window ourselves to avoid this situation.
if (cparent->WindowState() == Minimized)
cparent->SetWindowState(Normal);
[cparent->Window addChildWindow:Window ordered:NSWindowAbove];
UpdateStyle();

Loading…
Cancel
Save