frontend: avoid hiding floating docks when the OBS app is not active on macOS.#13325
Open
TizianoCoroneo wants to merge 1 commit intoobsproject:masterfrom
Open
Conversation
This PR changes the behavior of floating docks on macOS to have them stay visible while the OBS app is not active. The main change is to set the `NSWindow.hidesOnDeactivate` setting to false. This is enough to keep the docks visible. The remaining changes are just making sure that this setting is consistent across all the different ways OBS creates docks. In macOS, only one app can be "active" (aka "focused") at the time, and "floating panels" (OBS' docks in this case) disappear by default when their parent app is not active. The issue is that disappearing floating panels defy many of the use cases that OBS is great for. For example: - I'm doing game streaming on Twitch. I want to keep track of my chat. - I have a floating panel displaying the "Twitch chat" dock on a side monitor. - I click on my game, which becomes the active app. OBS is not the active app anymore, therefore the chat dock panel disappears. This is a common issue between macOS users: - https://obsproject.com/forum/threads/popped-out-docks-disappear-when-obs-is-not-in-focus.165011/ - https://obsproject.com/forum/threads/keep-dock-windows-visible-even-when-obs-is-not-in-focus.167324/
TizianoCoroneo
commented
Apr 15, 2026
| [dock](bool) { SetMacOSDockFloatingBehavior(dock, dock->isFloating()); }); | ||
|
|
||
| if (dock->isFloating()) { | ||
| QTimer::singleShot(0, dock, [dock]() { SetMacOSDockFloatingBehavior(dock, dock->isFloating()); }); |
Author
There was a problem hiding this comment.
Copied this idea from frontend/widgets/OBSBasic_SceneCollections.cpp:1633
|
|
||
| if (floating) { | ||
| nsWindow.level = NSFloatingWindowLevel; | ||
| nsWindow.hidesOnDeactivate = NO; |
Author
There was a problem hiding this comment.
This is the critical line :)
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.
Description
This PR changes the behavior of floating docks on macOS to have them stay visible while the OBS app is not active.
The main change is to set the
NSWindow.hidesOnDeactivatesetting to false. This is enough to keep the docks visible.The remaining changes are just making sure that this setting is consistent across all the different ways OBS creates docks.
Motivation and Context
In macOS, only one app can be "active" (aka "focused") at the time, and "floating panels" (OBS' docks in this case) disappear by default when their parent app is not active.
The issue is that disappearing floating panels defy many of the use cases that OBS is great for. For example:
This is a common issue between macOS users:
How Has This Been Tested?
I tested this change on my MacBook Pro M4 Pro, running macOS Tahoe 26.4.1.
Test by:
Other platforms are not affected as we use the
#ifdef __APPLE__directive to gate the logic.Types of changes
Checklist:
I'm not sure what I'm supposed to do here. My PR targets the master branch, but I found no other indications of what to target otherwise.