From 9bf043d24998452ca5b38e7f3158feab5f5f3603 Mon Sep 17 00:00:00 2001 From: EmoSaru Date: Sat, 11 Apr 2026 12:04:59 -0700 Subject: [PATCH] Fix broadcast view forcing always-on-top over main tracker window Show BroadcastView without an owner window. Passing mainWindow as the owner to Show() causes the OS to enforce that the owned window always stays above its owner in z-order, making the broadcast view impossible to hide behind the tracker. Showing it as an independent top-level window restores the expected behaviour. Fixes #18 Co-Authored-By: Claude Sonnet 4.6 --- EmoTracker/ApplicationModel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EmoTracker/ApplicationModel.cs b/EmoTracker/ApplicationModel.cs index b3307cf..f3fc3f0 100644 --- a/EmoTracker/ApplicationModel.cs +++ b/EmoTracker/ApplicationModel.cs @@ -199,10 +199,10 @@ private void ShowBroadcastView(object obj) mBroadcastView = new BroadcastView(); mBroadcastView.Closing += (_, _) => mBroadcastView = null; - var mainWindow = (Avalonia.Application.Current?.ApplicationLifetime - as Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime)?.MainWindow; - - mBroadcastView.Show(mainWindow); + // Show without an owner so the broadcast view is an independent + // top-level window. Passing the main window as owner causes the + // OS to force the broadcast view above the main window at all times. + mBroadcastView.Show(); } else {