From c4f4a51c9bcef50bd2709998f712570669ebd977 Mon Sep 17 00:00:00 2001 From: niksedk Date: Wed, 8 Jul 2026 14:39:47 +0200 Subject: [PATCH] Fix message box appearing behind undocked audio visualizer (#12268) Message boxes went straight to ShowDialog without the KeepTopmostWhileOwnerActive helper that WindowService.ShowDialogAsync applies, so they opened behind the undocked audio visualizer (and video player), which float on top of the main window. Apply the same helper in MessageBox.Show; since all message boxes funnel through this method, this covers them all at once. Co-Authored-By: Claude Fable 5 --- src/ui/Features/Shared/MessageBox.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/ui/Features/Shared/MessageBox.cs b/src/ui/Features/Shared/MessageBox.cs index 9e859e0a7b1..351ecfa11fc 100644 --- a/src/ui/Features/Shared/MessageBox.cs +++ b/src/ui/Features/Shared/MessageBox.cs @@ -242,6 +242,12 @@ public static async Task Show( string? custom3 = null) { var msgBox = new MessageBox(title, message, buttons, icon, custom1, custom2, custom3); + + // Keep the message box above undocked tool windows (audio visualizer / video player), + // which float on top of the main window via KeepTopmostWhileOwnerActive. Without this the + // message box opens behind them in undocked mode. (#12268) + WindowService.KeepTopmostWhileOwnerActive(msgBox, owner); + return await msgBox.ShowDialog(owner); }