diff --git a/src/TwitchStreamingTools/Views/WindowsTitleBar.axaml.cs b/src/TwitchStreamingTools/Views/WindowsTitleBar.axaml.cs index f5fc10d..9c6ec29 100644 --- a/src/TwitchStreamingTools/Views/WindowsTitleBar.axaml.cs +++ b/src/TwitchStreamingTools/Views/WindowsTitleBar.axaml.cs @@ -110,7 +110,9 @@ private async void SubscribeToWindowState() { while (hostWindow == null) { hostWindow = VisualRoot as Window; - await Task.Delay(50).ConfigureAwait(false); + + // Need to stay on the GUI thread. + await Task.Delay(50).ConfigureAwait(true); } hostWindow.GetObservable(Window.WindowStateProperty).Subscribe(s => {