Skip to content

macOS: floating docks disappear while OBS is not the active app #5409

Closed

Description

@vpacher

Problem

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.

Activity

  1. added
    bug
    on Nov 21, 2026
  2. vpacher commented on Nov 21, 2026

    @vpacher
    MemberAuthor

    Claiming: #5409

    Plan (one PR, today):

    1. 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.
    2. 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.
    3. 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.

  3. added
    ready
    on Nov 21, 2026
  4. added a commit that references this issue on Nov 21, 2026
    224faff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugready

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions