Browse Source

Fix window minimization attempt 2.

The previous solution didn't work for owned windows. Hopefully this fixes the problem at its root: that `BringToFront` activates a window even if it's miniaturized.
pull/8405/head
Steven Kirk 4 years ago
parent
commit
2822f5bfcb
  1. 15
      native/Avalonia.Native/src/OSX/WindowImpl.mm

15
native/Avalonia.Native/src/OSX/WindowImpl.mm

@ -119,13 +119,16 @@ void WindowImpl::BringToFront()
{ {
if(Window != nullptr) if(Window != nullptr)
{ {
if(IsDialog()) if (![Window isMiniaturized])
{ {
Activate(); if(IsDialog())
} {
else Activate();
{ }
[Window orderFront:nullptr]; else
{
[Window orderFront:nullptr];
}
} }
[Window invalidateShadow]; [Window invalidateShadow];

Loading…
Cancel
Save