Skip to content

Commit

Permalink
Merge pull request AvaloniaUI#7937 from AvaloniaUI/fixes/osx-reset-wi…
Browse files Browse the repository at this point in the history
…ndowstate-when-dragged-in-maximised-state

[OSX] reset maximised state when window is dragged.
  • Loading branch information
maxkatz6 authored and grokys committed Apr 25, 2022
1 parent 6f4f792 commit bad7e0a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions native/Avalonia.Native/src/OSX/window.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2380,6 +2380,16 @@ - (void)windowDidMove:(NSNotification *)notification

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);
}
Expand Down

0 comments on commit bad7e0a

Please sign in to comment.