Browse Source
Merge pull request #7937 from AvaloniaUI/fixes/osx-reset-windowstate-when-dragged-in-maximised-state
[OSX] reset maximised state when window is dragged.
pull/7950/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
0 deletions
-
native/Avalonia.Native/src/OSX/window.mm
|
|
|
@ -2461,6 +2461,16 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
|
|
|
|
|
if(_parent != nullptr) |
|
|
|
{ |
|
|
|
auto cparent = dynamic_cast<WindowImpl*>(_parent.getRaw()); |
|
|
|
|
|
|
|
if(cparent != nullptr) |
|
|
|
{ |
|
|
|
if(cparent->WindowState() == Maximized) |
|
|
|
{ |
|
|
|
cparent->SetWindowState(Normal); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
_parent->GetPosition(&position); |
|
|
|
_parent->BaseEvents->PositionChanged(position); |
|
|
|
} |
|
|
|
|