Browse Source

Merge pull request #6407 from AvaloniaUI/fixes/6399-osx-minimized-state

OSX: Fix a couple of minimized WindowState bugs
release/0.10.7
Dan Walmsley 5 years ago
parent
commit
531709b62f
  1. 7
      native/Avalonia.Native/src/OSX/window.mm

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

@ -690,6 +690,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();
@ -1181,6 +1187,7 @@ private:
}
_actualWindowState = _lastWindowState;
WindowEvents->WindowStateChanged(_actualWindowState);
}

Loading…
Cancel
Save