Skip to content

Float undocked video/waveform while SE main is active#11246

Merged
niksedk merged 1 commit into
mainfrom
feat/undocked-windows-float-while-active
May 29, 2026
Merged

Float undocked video/waveform while SE main is active#11246
niksedk merged 1 commit into
mainfrom
feat/undocked-windows-float-while-active

Conversation

@niksedk
Copy link
Copy Markdown
Member

@niksedk niksedk commented May 29, 2026

Summary

Applies WindowService.KeepTopmostWhileOwnerActive — introduced for Find/Replace in #11243 — to the two undocked windows opened from MainViewModel.VideoUndockControls (around MainViewModel.cs:5252 / :5258).

Result: the undocked video player and audio visualizer now stay visually above SE main while either SE window is the active app, and drop behind when SE loses focus to another application. Matches what GrampaWildWilly asked for in their follow-up on #11229 ("the audio visualizer doesn't stay visible, floating on top of the main window").

Important: this does not change Alt+Tab grouping. KeepTopmost… is a Z-order knob, not an ownership change. The two undocked windows remain independent top-levels in the Alt+Tab list, which was the whole point of #11229.

Why it's safe

  • Both call sites pass the configure callback to ShowIndependentWindow, which runs configure before Show(). The helper just subscribes to Activated/Deactivated (which fire after Show) and writes one initial Topmost value — both safe on an unshown window.
  • The helper unsubscribes on the child's Closed event, so the existing redock/cleanup path in MainViewModel.cs:5230-5263 continues to work unchanged.
  • macOS: same fix as Make Find/Replace topmost only while main window has focus #11243Topmost flips to false on Deactivated, so it does not leak across applications.
  • Fullscreen video player: when fullscreen takes focus, main.IsActive goes to false, so neither helper raises its child above the fullscreen window.

Test plan

  • Windows: undock both. Click main → both undocked windows raise above main. Click Firefox/Notepad → both drop behind.
  • Windows: with video player fullscreened on the undocked window, the audio visualizer does not punch through.
  • macOS: same behavior; verify undocked windows do not float above other apps.
  • Linux: behavior matches today's Find/Replace (depends on WM honoring Topmost).
  • Alt+Tab still treats both undocked windows as independent top-levels (Show undocked video/waveform windows as independent top-levels #11229 behavior preserved).
  • Redock controls → both undocked windows close cleanly, no leftover event subscriptions (verified via the helper's Closed cleanup).

🤖 Generated with Claude Code

Apply WindowService.KeepTopmostWhileOwnerActive — introduced for
Find/Replace in #11243 — to the undocked video player and audio
visualizer windows. They now stay visually above SE main while either
SE window is the active app, and drop behind when SE loses focus to
another application.

This addresses GrampaWildWilly's follow-up on #11229
("the audio visualizer doesn't stay visible, floating on top of the
main window") without touching Alt+Tab behavior — KeepTopmost… is just
a Z-order knob; the two undocked windows remain independent
top-levels in the Alt+Tab list, which was the point of #11229.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Applies the existing WindowService.KeepTopmostWhileOwnerActive behavior (added for Find/Replace) to the two “undocked” windows created from MainViewModel.VideoUndockControls, so they stay above the main window while Subtitle Edit is the active application and drop behind when SE loses focus.

Changes:

  • Call WindowService.KeepTopmostWhileOwnerActive(child, main) for the undocked video player window.
  • Call WindowService.KeepTopmostWhileOwnerActive(child, main) for the undocked audio visualizer window.
  • Add inline comments clarifying Z-order intent and non-impact on Alt+Tab grouping.

@niksedk niksedk merged commit e31a60e into main May 29, 2026
3 of 4 checks passed
@niksedk niksedk deleted the feat/undocked-windows-float-while-active branch May 29, 2026 08:30
@GrampaWildWilly
Copy link
Copy Markdown

THANK YOU!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants