Fix Find and Replace dialogs floating above other apps on macOS#11234
Closed
mjuhasz wants to merge 2 commits into
Closed
Fix Find and Replace dialogs floating above other apps on macOS#11234mjuhasz wants to merge 2 commits into
mjuhasz wants to merge 2 commits into
Conversation
On macOS, Avalonia maps Topmost=true to NSWindowLevel.Floating, which keeps the window above all other applications system-wide. The dialogs are already owned windows via Show(owner), so on macOS owned windows naturally stay above their owner without needing Topmost.
Contributor
There was a problem hiding this comment.
Pull request overview
Adjusts the Find and Replace windows on macOS so they don’t behave as “always on top” system-wide, aligning the UX with the intended owned-window behavior while keeping Windows/Linux unchanged.
Changes:
- Make Find dialog
Topmostconditional (falseon macOS). - Make Replace dialog
Topmostconditional (falseon macOS).
After a wrap-around confirmation, restore Topmost to !OperatingSystem.IsMacOS() instead of unconditionally true, so Find and Replace windows stay non-topmost on macOS as intended.
7 tasks
Member
|
A crossplatform fix is hopefully here: #11243 |
pull Bot
pushed a commit
to A-Archives-and-Forks/subtitleedit
that referenced
this pull request
May 29, 2026
Avoids the Find/Replace dialogs floating above other applications on macOS, where Avalonia maps Topmost to NSWindowLevel.Floating process-wide. Topmost is now toggled dynamically based on owner/child activation, giving the same behavior on Windows, Linux, and macOS without an OS-specific branch. Alternative to SubtitleEdit#11234. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
I tested the macOS cases, it all works 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change is specific to macOS and aims to align the user experience with the other two supported platforms. I have only tested this on macOS; on Windows and Linux the behavior is unchanged.
Before
Opening the Find or Replace dialog set Topmost=true, which Avalonia maps to NSWindowLevel.Floating on macOS. This caused the dialog to float above every application system-wide — so switching to another app (e.g. a video player or text editor to reference source material) would leave the dialog obstructing that app's window, with no way to dismiss it without returning to Subtitle Edit.
After
The dialog behaves as a proper owned window. It stays above the Subtitle Edit main window but is not modal so you can keep it open while editing the found text, but when you switch to another app it no longer floats on top of it. On Windows and Linux the behavior is unchanged.