Fix: service-profile dialog must open with foreground focus (NVDA)
Ed clicked Yes on the weak-service-password nag and the service-settings dialog opened BEHIND everything — he had to Alt-Tab to find it, and the nested change-password dialog with it. Cause: ConfigureServiceProfile opened ServiceProfileDialog with a plain ShowDialog(this), which does NOT surface the dialog when the main window is minimised in the tray. The app already has the fix — ForegroundDialog (the 1x1-owner + foreground-lock dance the mic/Realtek/About warnings use) — but this dialog bypassed it, and it's now reachable from a nag that fires while minimised. Now routed through ForegroundDialog, so it opens front-and-centre with focus wherever RemSound is sitting. The nested "Set service profile password" dialog already uses ForegroundDialog, so it inherits the foreground once its parent is up (that was Ed's second complaint — a cascade from the unfocused parent, not a separate bug). Gate 71/71 + 7 relay tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2437,7 +2437,11 @@ public sealed partial class MainForm : Form
|
||||
current ??= Profile.NewBlank();
|
||||
|
||||
using var dlg = new ServiceProfileDialog(current, ServiceStore.LoadLoggingEnabled());
|
||||
if (dlg.ShowDialog(this) != DialogResult.OK) return;
|
||||
// Via ForegroundDialog so it opens front-and-centre with focus even when the main window is
|
||||
// minimised in the tray — this dialog is now reachable from the weak-service-password nag,
|
||||
// which can fire while RemSound is minimised (Ed, 2026-07-27: "clicked Yes but had to Alt-Tab
|
||||
// to find it"). The nested "Set password" dialog inherits the foreground once its parent is up.
|
||||
if (ForegroundDialog.Show(owner => dlg.ShowDialog(owner)) != DialogResult.OK) return;
|
||||
try
|
||||
{
|
||||
ServiceStore.SaveProfile(dlg.Result);
|
||||
|
||||
Reference in New Issue
Block a user