Skip to content

Commit

Permalink
win32- set internal _shown flag if ShowWindow will make window visible
Browse files Browse the repository at this point in the history
  • Loading branch information
emmauss committed Jun 17, 2024
1 parent 99cf2f8 commit c4ae3b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Windows/Avalonia.Win32/WindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1203,6 +1203,11 @@ private void ShowWindow(WindowState state, bool activate)
if (command.HasValue)
{
UnmanagedMethods.ShowWindow(_hwnd, command.Value);

if (!_shown && command.Value != ShowWindowCommand.Minimize && GetStyle().HasFlag(WindowStyles.WS_VISIBLE))
{
_shown = true;
}
}

if (state == WindowState.Maximized)
Expand Down

0 comments on commit c4ae3b7

Please sign in to comment.