From 6565b5574667e6624e14cca7e20a125e4319cfa8 Mon Sep 17 00:00:00 2001 From: Kevin Zhang Date: Sun, 5 Dec 2021 21:06:33 -0600 Subject: [PATCH] Use API mainwindow show --- Plugins/Flow.Launcher.Plugin.Shell/Main.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs index 41c4ae816..de934f3ef 100644 --- a/Plugins/Flow.Launcher.Plugin.Shell/Main.cs +++ b/Plugins/Flow.Launcher.Plugin.Shell/Main.cs @@ -340,9 +340,7 @@ namespace Flow.Launcher.Plugin.Shell context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}"); // show the main window and set focus to the query box - Window mainWindow = Application.Current.MainWindow; - mainWindow.Show(); - mainWindow.Focus(); + context.API.ShowMainWindow(); } public Control CreateSettingPanel()