From 721b80c73de862a05316bde18cb999df84e7cc46 Mon Sep 17 00:00:00 2001 From: Nguyen Duy Date: Mon, 16 Dec 2024 11:58:16 +0700 Subject: [PATCH] fix: window not responding on stacked dialog --- app/MainWindow.xaml.cs | 2 +- app/Tray.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/MainWindow.xaml.cs b/app/MainWindow.xaml.cs index 50c7540..6b2bbf1 100644 --- a/app/MainWindow.xaml.cs +++ b/app/MainWindow.xaml.cs @@ -142,7 +142,7 @@ namespace ParsecVDisplay { e.Handled = true; UpdateDriverLabel(); - Tray.Instance?.QueryDriver(null, null); + Tray.Instance.Invoke(() => Tray.Instance.QueryDriver(null, null)); } private void OpenRepoLink(object sender, MouseButtonEventArgs e) diff --git a/app/Tray.cs b/app/Tray.cs index e47413f..39661a6 100644 --- a/app/Tray.cs +++ b/app/Tray.cs @@ -406,7 +406,7 @@ namespace ParsecVDisplay public void Invoke(Action action) { - TrayIcon.ContextMenuStrip.Invoke(action); + TrayIcon.ContextMenuStrip.BeginInvoke(action); } private void SetLanguage(object sender, EventArgs e)