You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
macOS: floating docks disappear while OBS is not the active app #5409
On macOS, a floating dock (for example Scenes or Stats on a second display) disappears when another app becomes active. It shows again when OBS becomes active. The main window stays visible the whole time.
Seen on macOS 27.2.1 with Qt 6.11.1. The #5230 changes do not touch this (they set no window flags or attributes).
Cause
A floating QDockWidget is a Qt::Tool window. On macOS, Qt makes tool windows panels that hide while the application is inactive (NSPanel.hidesOnDeactivate). OBS sets no attribute against this, so every floating dock hides.
Expected
A floating dock stays visible while OBS is in the background, as the main window does: users put docks on another display to watch them while they work in other apps.
Possible fix
Set Qt::WA_MacAlwaysShowToolWindow on each dock (OBSDock and the docks OBSBasic creates), for example when it becomes floating (topLevelChanged). Check by hand on macOS: float a dock, switch to another app, the dock stays visible.
RED: floating_dock_stays_shown_while_inactive in test_close_top_level floats a dock after KeepFloatingDockShown() (a stub) and checks for Qt::WA_MacAlwaysShowToolWindow.
GREEN: KeepFloatingDockShown() (frontend/utility/dock-window.hpp) sets the attribute; OBSDock calls it in its constructors, and AddDockWidget() / AddCustomDockWidget() call it for a plugin's own QDockWidget.
Checked by hand on macOS: a floating Scenes or Stats dock stays visible while another app is in front.
Linux and Windows: the attribute does nothing there. KWin (KDE Plasma) has its own option "Hide utility windows for inactive applications", which can hide floating docks the same way; not tested, and not changed by this PR.
Activity
vpacher commentedon Nov 21, 2026
Claiming: #5409
Plan (one PR, today):
floating_dock_stays_shown_while_inactiveintest_close_top_levelfloats a dock afterKeepFloatingDockShown()(a stub) and checks forQt::WA_MacAlwaysShowToolWindow.KeepFloatingDockShown()(frontend/utility/dock-window.hpp) sets the attribute;OBSDockcalls it in its constructors, andAddDockWidget()/AddCustomDockWidget()call it for a plugin's ownQDockWidget.Linux and Windows: the attribute does nothing there. KWin (KDE Plasma) has its own option "Hide utility windows for inactive applications", which can hide floating docks the same way; not tested, and not changed by this PR.
docs: features ledger line for floating docks that stay visible (Refs #…
test: the close-top-level registration watches dock-window.hpp (Refs #…
frontend: a floating dock stays shown while OBS is inactive (Fixes ob…
test: test_close_top_level becomes test_top_level_windows, GREEN (Fixes
frontend: one DockWindow object for what OBS adds to each dock window (…
test: test_close_top_level becomes test_top_level_windows, with one g…