mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 21:15:38 +02:00
fix z-order restore failure for foreground window
This commit is contained in:
parent
d8fc91ba30
commit
c6d81deb6a
2 changed files with 2 additions and 2 deletions
|
@ -1288,13 +1288,12 @@ namespace Ninjacrab.PersistentWindows.Common
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
if (IsTaskBar(prevWindow))
|
||||
{
|
||||
Log.Error("avoid restore under taskbar for window {0}", GetWindowTitle(hWnd));
|
||||
User32.ShowWindow(hWnd, User32.SW_SHOW);
|
||||
return 0; // issue 21, avoid restore to top z-order
|
||||
}
|
||||
*/
|
||||
|
||||
bool ok = User32.SetWindowPos(
|
||||
hWnd,
|
||||
|
|
|
@ -246,6 +246,7 @@ namespace Ninjacrab.PersistentWindows.Common.WinApiBridge
|
|||
public static extern bool ShowWindowAsync(IntPtr hWnd, int cmd);
|
||||
|
||||
public const int SW_SHOWMINNOACTIVE = 7;
|
||||
public const int SW_SHOW = 5;
|
||||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
[return: MarshalAs(UnmanagedType.Bool)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue