mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Remove Uncessary Window.Activate()
This commit is contained in:
parent
794911aad4
commit
867c2a711b
2 changed files with 9 additions and 3 deletions
|
|
@ -55,7 +55,7 @@ namespace Flow.Launcher
|
|||
SetHotkey(ctlHotkey.CurrentHotkey, delegate
|
||||
{
|
||||
App.API.ChangeQuery(pluginHotkey.ActionKeyword);
|
||||
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
||||
ShowMainWindow();
|
||||
});
|
||||
}
|
||||
else
|
||||
|
|
@ -73,11 +73,18 @@ namespace Flow.Launcher
|
|||
SetHotkey(new HotkeyModel(updateCustomHotkey.Hotkey), delegate
|
||||
{
|
||||
App.API.ChangeQuery(updateCustomHotkey.ActionKeyword);
|
||||
Application.Current.MainWindow.Visibility = Visibility.Visible;
|
||||
ShowMainWindow();
|
||||
});
|
||||
}
|
||||
|
||||
Close();
|
||||
|
||||
static void ShowMainWindow()
|
||||
{
|
||||
Window mainWindow = Application.Current.MainWindow;
|
||||
mainWindow.Visibility = Visibility.Visible;
|
||||
mainWindow.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateItem(CustomPluginHotkey item)
|
||||
|
|
|
|||
|
|
@ -302,7 +302,6 @@ namespace Flow.Launcher.Plugin.Shell
|
|||
// show the main window and set focus to the query box
|
||||
Window mainWindow = Application.Current.MainWindow;
|
||||
mainWindow.Visibility = Visibility.Visible;
|
||||
mainWindow.Activate();
|
||||
mainWindow.Focus();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue