From 111956e2f3187361fb113e212fa71af67bc78ef3 Mon Sep 17 00:00:00 2001 From: ryanbodrug-microsoft <56318517+ryanbodrug-microsoft@users.noreply.github.com> Date: Wed, 8 Apr 2020 16:28:11 -0700 Subject: [PATCH] Fixing xaml catastrophic failure, based on Miguels suggestion here: https://github.com/windows-toolkit/Microsoft.Toolkit.Win32/issues/210 --- src/modules/launcher/PowerLauncher/App.xaml.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/modules/launcher/PowerLauncher/App.xaml.cs b/src/modules/launcher/PowerLauncher/App.xaml.cs index 86d1da4532..12e5b8312a 100644 --- a/src/modules/launcher/PowerLauncher/App.xaml.cs +++ b/src/modules/launcher/PowerLauncher/App.xaml.cs @@ -18,10 +18,13 @@ using Stopwatch = Wox.Infrastructure.Stopwatch; namespace PowerLauncher { + + public partial class App : IDisposable, ISingleInstanceApp { public static PublicAPIInstance API { get; private set; } - private const string Unique = "Wox_Unique_Application_Mutex"; + private const string UI_Unique = "LauncherUI_Unique_Application_Mutex"; + private const string Unique = "Launcher_Unique_Application_Mutex"; private static bool _disposed; private Settings _settings; private MainViewModel _mainVM; @@ -34,10 +37,13 @@ namespace PowerLauncher { if (SingleInstance.InitializeAsFirstInstance(Unique)) { - using (var application = new App()) + using (new UI.App()) { - application.InitializeComponent(); - application.Run(); + using (var application = new App()) + { + application.InitializeComponent(); + application.Run(); + } } } }