mirror of
https://github.com/kangyu-california/PersistentWindows.git
synced 2025-05-11 13:05:38 +02:00
#347, avoid invoke webpage commander window when pressing hotkey on taskbar
This commit is contained in:
parent
3240042a68
commit
2a7a108748
2 changed files with 9 additions and 4 deletions
|
@ -2125,8 +2125,11 @@ namespace PersistentWindows.Common
|
|||
return fixZorder == 2 || (restoringSnapshot && fixZorder > 0);
|
||||
}
|
||||
|
||||
public static IntPtr GetForegroundWindow()
|
||||
public static IntPtr GetForegroundWindow(bool strict = false)
|
||||
{
|
||||
if (strict)
|
||||
return User32.GetForegroundWindow();
|
||||
|
||||
IntPtr topMostWindow = User32.GetTopWindow(desktopWindow);
|
||||
for (IntPtr hwnd = topMostWindow; hwnd != IntPtr.Zero; hwnd = User32.GetWindow(hwnd, 2))
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue