Skip to content

Commit eaf0649

Browse files
committed
Add Delay to Opacity when Main Window Deactive
1 parent a301d8e commit eaf0649

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Flow.Launcher/Helper/SingletonWindowOpener.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public static T Open<T>(params object[] args) where T : Window
1010
{
1111
var window = Application.Current.Windows.OfType<Window>().FirstOrDefault(x => x.GetType() == typeof(T))
1212
?? (T)Activator.CreateInstance(typeof(T), args);
13-
Application.Current.MainWindow.Hide();
1413

1514
// Fix UI bug
1615
// Add `window.WindowState = WindowState.Normal`

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,9 +315,10 @@ private async void OnContextMenusForSettingsClick(object sender, RoutedEventArgs
315315
}
316316

317317

318-
private void OnDeactivated(object sender, EventArgs e)
318+
private async void OnDeactivated(object sender, EventArgs e)
319319
{
320320
_viewModel.Save();
321+
await Task.Delay(100);
321322
if (_settings.HideWhenDeactive)
322323
{
323324
_viewModel.Hide();

0 commit comments

Comments
 (0)