Browse Source
Merge pull request #9326 from AvaloniaUI/fixes/osx-child-windows-cant-minimise
OSX: fix minimise button being disabled when either a parent or a dialog.
pull/9343/head
Max Katz
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
native/Avalonia.Native/src/OSX/WindowImpl.mm
|
|
@ -63,7 +63,7 @@ HRESULT WindowImpl::Show(bool activate, bool isDialog) { |
|
|
START_COM_CALL; |
|
|
START_COM_CALL; |
|
|
|
|
|
|
|
|
@autoreleasepool { |
|
|
@autoreleasepool { |
|
|
_isDialog = isDialog; |
|
|
_isDialog = isDialog || _parent != nullptr; |
|
|
|
|
|
|
|
|
WindowBaseImpl::Show(activate, isDialog); |
|
|
WindowBaseImpl::Show(activate, isDialog); |
|
|
|
|
|
|
|
|
@ -96,6 +96,8 @@ HRESULT WindowImpl::SetParent(IAvnWindow *parent) { |
|
|
auto cparent = dynamic_cast<WindowImpl *>(parent); |
|
|
auto cparent = dynamic_cast<WindowImpl *>(parent); |
|
|
|
|
|
|
|
|
_parent = cparent; |
|
|
_parent = cparent; |
|
|
|
|
|
|
|
|
|
|
|
_isDialog = _parent != nullptr; |
|
|
|
|
|
|
|
|
if(_parent != nullptr && Window != 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 |
|
|
// If one tries to show a child window with a minimized parent window, then the parent window will be |
|
|
|