mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Check window is InternetExplorer type
This commit is contained in:
parent
1109f9887e
commit
aa5ca76b18
1 changed files with 9 additions and 3 deletions
|
|
@ -731,13 +731,19 @@ namespace Flow.Launcher.ViewModel
|
|||
ShellWindows shellWindows = new SHDocVw.ShellWindows();
|
||||
|
||||
// loop through all windows
|
||||
foreach (SHDocVw.InternetExplorer window in shellWindows)
|
||||
foreach (var window in shellWindows)
|
||||
{
|
||||
if (window is not SHDocVw.InternetExplorer)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var explorerWindow = (SHDocVw.InternetExplorer)window;
|
||||
// match active window
|
||||
if (window.HWND == (int)handle)
|
||||
if (explorerWindow.HWND == (int)handle)
|
||||
{
|
||||
// Required ref: Shell32 - C:\Windows\system32\Shell32.dll
|
||||
var shellWindow = window.Document as Shell32.IShellFolderViewDual2;
|
||||
var shellWindow = explorerWindow.Document as Shell32.IShellFolderViewDual2;
|
||||
|
||||
// will be null if you are in Internet Explorer for example
|
||||
if (shellWindow != null)
|
||||
|
|
|
|||
Loading…
Reference in a new issue