diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs index a0453da390..f2aa51ab61 100644 --- a/Wox/MainWindow.xaml.cs +++ b/Wox/MainWindow.xaml.cs @@ -71,6 +71,14 @@ namespace Wox SetCustomPluginHotkey(); globalHotkey.hookedKeyboardCallback += KListener_hookedKeyboardCallback; + + this.Closing += new System.ComponentModel.CancelEventHandler(MainWindow_Closing); + } + + void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) + { + this.HideWox(); + e.Cancel = true; } private void MainWindow_OnLoaded(object sender, RoutedEventArgs e)