Skip to content

Commit f36400c

Browse files
authored
Merge pull request #7537 from fr-Pursuit/master
Minimization bugfix on Windows
2 parents f145424 + c4e31f5 commit f36400c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Windows/Avalonia.Win32/WindowImpl.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ public WindowState WindowState
265265
{
266266
if (IsWindowVisible(_hwnd))
267267
{
268-
ShowWindow(value, true);
268+
ShowWindow(value, value != WindowState.Minimized); // If the window is minimized, it shouldn't be activated
269269
}
270270

271271
_showWindowState = value;
@@ -973,7 +973,7 @@ private void ShowWindow(WindowState state, bool activate)
973973
{
974974
case WindowState.Minimized:
975975
newWindowProperties.IsFullScreen = false;
976-
command = activate ? ShowWindowCommand.Minimize : ShowWindowCommand.ShowMinNoActive;
976+
command = ShowWindowCommand.Minimize;
977977
break;
978978
case WindowState.Maximized:
979979
newWindowProperties.IsFullScreen = false;

0 commit comments

Comments
 (0)