Repository navigation
frontend: a floating dock stays shown while OBS is inactive (Fixes #5409) - #5412
Merged
Merged
Conversation
) floating_dock_stays_shown_while_inactive in test_close_top_level floats a dock after KeepFloatingDockShown() (frontend/utility/dock-window.hpp, a stub that does nothing) and checks that the dock's tool window has Qt::WA_MacAlwaysShowToolWindow. Without it, Qt on macOS hides the window while another app is active. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…5409) KeepFloatingDockShown() sets Qt::WA_MacAlwaysShowToolWindow. OBSDock calls it in its constructors (the main docks, Controls, Stats, docks added through the frontend API, browser docks), and AddDockWidget() and AddCustomDockWidget() call it for a plugin's own QDockWidget. On macOS Qt then no longer hides a floating dock while another app is active; on other platforms the attribute does nothing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…5409) Co-Authored-By: Claude Opus 5.5 <[email protected]>
vpacher
force-pushed
the
fix/5409-floating-docks-stay-visible
branch
from
November 21, 2026 13:11
8f28909 to
fb23f85
Compare
vpacher
marked this pull request as ready for review
November 21, 2026 13:20
vpacher
enabled auto-merge
November 21, 2026 13:20
…5409) canonical_close_top_level_is_registered pins the watch inputs of test_close_top_level; the floating dock case added dock-window.hpp to them (Fast Gate and the macOS and Windows Rust Tests, run 44907599907). Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Nov 21, 2026
This was referenced Nov 21, 2026
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.
Fixes #5409.
Problem
On macOS a floating dock (for example Scenes or Stats on a second display) disappeared whenever another app became active, and came back when OBS was active again. The main window stayed visible. A floating
QDockWidgetis aQt::Toolwindow, and Qt on macOS makes a tool window anNSPanelthat hides while the application is inactive, unless the widget hasQt::WA_MacAlwaysShowToolWindow. OBS set it nowhere.Change
KeepFloatingDockShown()(frontend/utility/dock-window.hpp, header-only, Qt Widgets only) setsQt::WA_MacAlwaysShowToolWindow. On other platforms the attribute does nothing.OBSDockcalls it in both constructors: the main docks, Controls, Stats, docks added through the frontend API and browser docks.OBSBasic::AddDockWidget()andOBSBasic::AddCustomDockWidget()call it too, for a plugin's ownQDockWidget.docs/features.md: one line under Fixed upstream bugs, Scenes and UI.Not in this PR: KWin (KDE Plasma) has its own option, "Hide utility windows for inactive applications", which can hide floating docks in the same way. This attribute does not change that, and it is not tested here.
Tests
floating_dock_stays_shown_while_inactiveintest_close_top_level(no new target): a main window with a dock,KeepFloatingDockShown(), then the dock floats; the case checks that the dock is a floating tool window withQt::WA_MacAlwaysShowToolWindow. The test shows that the attribute is set; that macOS then keeps the window shown is checked by hand (below).RED
62b5bd551(stub that does nothing): Linux (Qt 6.11.1, offscreen) fails withfloating 1, tool window 1, WA_MacAlwaysShowToolWindow 0 (expected 1 1 1). GREEN: 9/9 cases in 10 of 10 runs, and the Qt Frontend Linux lane passes (ci/linux_qt_frontend.py). Test cost: under 0.1 s for the new case, no own threads.Registration:
test_close_top_levelnow watchesfrontend/utility/dock-window.hpp, andcanonical_close_top_level_is_registeredpins it (64d75b427, after the first CI run failed on the old pin).Tier 2 and Tier 3: not applicable (frontend, no C original).
Real app
macOS 27.2.1 build on Apple silicon: float Scenes and Stats, click another app (Finder). Before: both docks disappear until OBS is active again. With the fix: both stay visible.
🤖 Generated with Claude Code