Skip to content

Stay-on-Top modal trap: dialog hidden behind other windows blocks app interaction #11

@Computer-Tsu

Description

@Computer-Tsu

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

  1. Enable Stay on Top (View → Stay on Top or Ctrl+T)
  2. Open Help → About
  3. Click another application in the taskbar to bring it forward
  4. 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

  • AboutDialogMainWindow.xaml.cs:114
  • SettingsWindowMainWindow.xaml.cs:80
  • TelemetryDataViewerMainWindow.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();

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinguiUser interface appearance or behavior

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions