mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Fix querying of explorer window
This commit is contained in:
parent
560088028d
commit
0a062c310a
1 changed files with 2 additions and 3 deletions
|
|
@ -44,7 +44,8 @@ namespace Flow.Launcher.Helper
|
|||
|
||||
// find the desired window and make sure that it is indeed a file explorer
|
||||
// we don't want the Internet Explorer or the classic control panel
|
||||
if (Path.GetFileName((string)window.FullName) == "explorer.exe" && new IntPtr(window.HWND) == handle)
|
||||
// ToLower() is needed, because Windows can report the path as "C:\\Windows\\Explorer.EXE"
|
||||
if (Path.GetFileName((string)window.FullName).ToLower() == "explorer.exe" && new IntPtr(window.HWND) == handle)
|
||||
{
|
||||
return window;
|
||||
}
|
||||
|
|
@ -53,8 +54,6 @@ namespace Flow.Launcher.Helper
|
|||
return null;
|
||||
}
|
||||
|
||||
// COM Imports
|
||||
|
||||
[DllImport("user32.dll")]
|
||||
private static extern IntPtr GetForegroundWindow();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue