Skip to content

Commit

Permalink
Merge pull request #9326 from AvaloniaUI/fixes/osx-child-windows-cant…
Browse files Browse the repository at this point in the history
…-minimise

OSX: fix minimise button being disabled when either a parent or a dialog.
  • Loading branch information
maxkatz6 authored and Dan Walmsley committed Dec 6, 2022
1 parent 0af2a96 commit cb56351
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion native/Avalonia.Native/src/OSX/WindowImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
START_COM_CALL;

@autoreleasepool {
_isDialog = isDialog;
_isDialog = isDialog || _parent != nullptr;

WindowBaseImpl::Show(activate, isDialog);

Expand Down Expand Up @@ -97,6 +97,8 @@
auto cparent = dynamic_cast<WindowImpl *>(parent);

_parent = cparent;

_isDialog = _parent != nullptr;

if(_parent != nullptr && Window != nullptr){
// If one tries to show a child window with a minimized parent window, then the parent window will be
Expand Down

0 comments on commit cb56351

Please sign in to comment.