Skip to content

Commit

Permalink
Merge pull request AvaloniaUI#8574 from AvaloniaUI/fixes/win32-consis…
Browse files Browse the repository at this point in the history
…tent-minimize-restore-window-size

Win32: Retain window position and size when docked and then minimized and restored.
# Conflicts:
#	tests/Avalonia.IntegrationTests.Appium/WindowTests.cs
  • Loading branch information
Dan Walmsley committed Aug 9, 2022
1 parent 46d83d1 commit 5f9c852
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Windows/Avalonia.Win32/WindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,12 @@ public WindowState WindowState

set
{
if (IsWindowVisible(_hwnd))
if (IsWindowVisible(_hwnd) && _lastWindowState != value)
{
ShowWindow(value, value != WindowState.Minimized); // If the window is minimized, it shouldn't be activated
}

_lastWindowState = value;
_showWindowState = value;
}
}
Expand Down

0 comments on commit 5f9c852

Please sign in to comment.