Fix #49. Alt + F4 will hide app now rather than crash

This commit is contained in:
Yeechan Lu
2014-03-20 02:02:18 +08:00
parent 10cbe25f17
commit 27dde4e70d

View File

@@ -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)