Skip to content

Commit

Permalink
Fix FocusOnToken so it actually works
Browse files Browse the repository at this point in the history
  • Loading branch information
CarbonNeuron committed Jan 22, 2021
1 parent 90168d8 commit 5388248
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions AUCapture-WPF/MainWindow.xaml.cs
Expand Up @@ -31,6 +31,8 @@
using System.Windows.Threading;
using AUCapture_WPF.Models;
using Discord;
using HandyControl.Tools;
using HandyControl.Tools.Extension;
using Humanizer;
using Color = System.Drawing.Color;
using PlayerColor = AmongUsCapture.PlayerColor;
Expand Down Expand Up @@ -129,18 +131,14 @@ public MainWindow()
return;
}
if (!w.IsVisible)
{
w.Show();
}
if (w.WindowState == WindowState.Minimized)
if (w.WindowState.Equals(WindowState.Minimized))
{
w.WindowState = WindowState.Normal;
}
w.Show();
w.Activate();
w.Focus(); // important
w.Focus(); // important
});
};

Expand Down

0 comments on commit 5388248

Please sign in to comment.