Skip to content

Commit

Permalink
Merge pull request AvaloniaUI#7537 from fr-Pursuit/master
Browse files Browse the repository at this point in the history
Minimization bugfix on Windows
  • Loading branch information
danwalmsley committed Feb 21, 2022
1 parent 80319bf commit 7b44621
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Windows/Avalonia.Win32/WindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ public WindowState WindowState
{
if (IsWindowVisible(_hwnd))
{
ShowWindow(value, true);
ShowWindow(value, value != WindowState.Minimized); // If the window is minimized, it shouldn't be activated
}

_showWindowState = value;
Expand Down Expand Up @@ -973,7 +973,7 @@ private void ShowWindow(WindowState state, bool activate)
{
case WindowState.Minimized:
newWindowProperties.IsFullScreen = false;
command = activate ? ShowWindowCommand.Minimize : ShowWindowCommand.ShowMinNoActive;
command = ShowWindowCommand.Minimize;
break;
case WindowState.Maximized:
newWindowProperties.IsFullScreen = false;
Expand Down

0 comments on commit 7b44621

Please sign in to comment.