Fix Wox restart by wait Mutex to be released

Fix bug in 24866ff032829e9bd34704d3d5970d227a4c8db3.
Wait existing Mutex to release itself instead of create a new one.
Relate issue: #322
This commit is contained in:
bao-qian
2015-11-29 03:28:47 +00:00
parent e3e5085214
commit 5bb90828f8
4 changed files with 15 additions and 25 deletions

View File

@@ -50,14 +50,16 @@ namespace Wox
AppDomain.CurrentDomain.UnhandledException += ErrorReporting.UnhandledExceptionHandle;
}
public bool OnActivate(IList<string> args)
public void OnActivate(IList<string> args)
{
if (args.Count > 0 && args[0] == SingleInstance<App>.Restart)
{
Window.CloseApp();
}
CommandArgsFactory.Execute(args);
return true;
else
{
CommandArgsFactory.Execute(args);
}
}
}
}