[Plugin.Shell] Fix: The Query Box Is Not Focused When HotKey Invoked

This commit is contained in:
Zelin Liao 2021-06-26 10:52:44 +08:00
parent 2e412a0023
commit 794911aad4

View file

@ -298,7 +298,12 @@ namespace Flow.Launcher.Plugin.Shell
private void OnWinRPressed()
{
context.API.ChangeQuery($"{context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeperater}");
Application.Current.MainWindow.Visibility = Visibility.Visible;
// show the main window and set focus to the query box
Window mainWindow = Application.Current.MainWindow;
mainWindow.Visibility = Visibility.Visible;
mainWindow.Activate();
mainWindow.Focus();
}
public Control CreateSettingPanel()