Skip to content

Commit 787daa3

Browse files
emosaruEmoSaruclaude
authored
Fix broadcast view forcing always-on-top over main tracker window (#21)
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: EmoSaru <emosaru@emosaru.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent fce9d02 commit 787daa3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

EmoTracker/ApplicationModel.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ private void ShowBroadcastView(object obj)
199199
mBroadcastView = new BroadcastView();
200200
mBroadcastView.Closing += (_, _) => mBroadcastView = null;
201201

202-
var mainWindow = (Avalonia.Application.Current?.ApplicationLifetime
203-
as Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime)?.MainWindow;
204-
205-
mBroadcastView.Show(mainWindow);
202+
// Show without an owner so the broadcast view is an independent
203+
// top-level window. Passing the main window as owner causes the
204+
// OS to force the broadcast view above the main window at all times.
205+
mBroadcastView.Show();
206206
}
207207
else
208208
{

0 commit comments

Comments
 (0)