Browse Source

Win32 implementation now checks the previous ShowWindowCommand and sets it back to that after hiding.

pull/1146/head
Jurjen Biewenga 9 years ago
parent
commit
34e82c19fb
  1. 12
      src/Windows/Avalonia.Win32/WindowImpl.cs

12
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -763,10 +763,14 @@ namespace Avalonia.Win32
else
style &= ~(UnmanagedMethods.WindowStyles.WS_EX_APPWINDOW);
//Toggle to make the styles stick
UnmanagedMethods.ShowWindow(_hwnd, ShowWindowCommand.Hide);
UnmanagedMethods.SetWindowLong(_hwnd, -20, (uint)style);
UnmanagedMethods.ShowWindow(_hwnd, ShowWindowCommand.Show);
WINDOWPLACEMENT windowPlacement = new WINDOWPLACEMENT();
if (UnmanagedMethods.GetWindowPlacement(_hwnd, ref windowPlacement))
{
//Toggle to make the styles stick
UnmanagedMethods.ShowWindow(_hwnd, ShowWindowCommand.Hide);
UnmanagedMethods.SetWindowLong(_hwnd, -20, (uint)style);
UnmanagedMethods.ShowWindow(_hwnd, windowPlacement.ShowCmd);
}
}
}
}

Loading…
Cancel
Save