Skip to content

Commit 1fdaec2

Browse files
committed
ChangeQuery after window is visible
1 parent 79a6fda commit 1fdaec2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,7 @@ private static string GetActiveExplorerPath()
731731
ShellWindows shellWindows = new SHDocVw.ShellWindows();
732732

733733
// loop through all windows
734-
foreach (InternetExplorer window in shellWindows)
734+
foreach (SHDocVw.InternetExplorer window in shellWindows)
735735
{
736736
// match active window
737737
if (window.HWND == (int)handle)
@@ -793,10 +793,7 @@ public void ToggleFlowLauncher()
793793
public void Show()
794794
{
795795
string _explorerPath = GetActiveExplorerPath();
796-
if (_explorerPath != null)
797-
{
798-
ChangeQueryText($"{_explorerPath}\\>");
799-
}
796+
800797

801798
if (_settings.UseSound)
802799
{
@@ -813,7 +810,10 @@ public void Show()
813810
((MainWindow)Application.Current.MainWindow).WindowAnimator();
814811

815812
MainWindowOpacity = 1;
816-
813+
if (_explorerPath != null && _explorerPath != "File Explorer")
814+
{
815+
ChangeQueryText($"{_explorerPath}\\>");
816+
}
817817

818818
}
819819

0 commit comments

Comments
 (0)