Description
When Stay on Top is enabled and a modal dialog (Help → About, Settings, Telemetry Viewer) is open, bringing another application window to the foreground can slide it on top of the PortPane dialog. The dialog is now hidden behind the foreign window but still holds modal focus — leaving PortPane's main window unresponsive and the dialog invisible and unreachable without Alt+Tab.
Steps to Reproduce
- Enable Stay on Top (View → Stay on Top or Ctrl+T)
- Open Help → About
- Click another application in the taskbar to bring it forward
- Attempt to click on the PortPane main window
Result: Main window does not respond. About dialog is hidden under the other application's window. App appears frozen.
Expected: Modal dialog should stay on top alongside the main window, or at minimum remain reachable.
Root Cause
ShowDialog() creates a modal relationship but WPF does not propagate Topmost from owner to the dialog window. MainWindow has Topmost="{Binding IsAlwaysOnTop}" but child dialogs have no Topmost set, so a foreign window can cover them while they retain modal focus.
Affected Dialogs
AboutDialog — MainWindow.xaml.cs:114
SettingsWindow — MainWindow.xaml.cs:80
TelemetryDataViewer — MainWindow.xaml.cs:138
FirstRunDialog is exempt (opens before MainWindow, no owner).
Fix
Before calling ShowDialog() at each call site, explicitly set:
dlg.Owner = this;
dlg.Topmost = Topmost;
dlg.ShowDialog();
Description
When Stay on Top is enabled and a modal dialog (Help → About, Settings, Telemetry Viewer) is open, bringing another application window to the foreground can slide it on top of the PortPane dialog. The dialog is now hidden behind the foreign window but still holds modal focus — leaving PortPane's main window unresponsive and the dialog invisible and unreachable without Alt+Tab.
Steps to Reproduce
Result: Main window does not respond. About dialog is hidden under the other application's window. App appears frozen.
Expected: Modal dialog should stay on top alongside the main window, or at minimum remain reachable.
Root Cause
ShowDialog()creates a modal relationship but WPF does not propagateTopmostfrom owner to the dialog window. MainWindow hasTopmost="{Binding IsAlwaysOnTop}"but child dialogs have noTopmostset, so a foreign window can cover them while they retain modal focus.Affected Dialogs
AboutDialog—MainWindow.xaml.cs:114SettingsWindow—MainWindow.xaml.cs:80TelemetryDataViewer—MainWindow.xaml.cs:138FirstRunDialogis exempt (opens before MainWindow, no owner).Fix
Before calling
ShowDialog()at each call site, explicitly set: