frontend: Hide Twitch docks on minimized start#1
frontend: Hide Twitch docks on minimized start#1BeekeeperAlex wants to merge 1 commit intomasterfrom
Conversation
When OBS starts hidden in the system tray, Twitch integration docks are created after the main window intentionally remains hidden. Floating dock widgets can still become visible on their own, so Twitch chat, stream info, stats, and activity feed panes may appear even though OBS itself started minimized. Track the intended visibility of Twitch docks while the main window is hidden, hide those docks during startup, and restore their saved visibility when the main window is first shown. Also allow secondary Twitch panes to restore their saved dock state during this hidden startup path before they are hidden.
|
Closing this duplicate fork-only PR. The upstream PR is obsproject#13368. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 753f86b282
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| bool TwitchAuth::eventFilter(QObject *obj, QEvent *event) | ||
| { | ||
| if (!deferredDockVisibilityRestore || event->type() != QEvent::Show || obj != OBSBasic::Get()) |
There was a problem hiding this comment.
Restore deferred dock visibility before saving state
The deferred visibility is only restored on QEvent::Show, so when OBS starts minimized to tray and the user exits from the tray without ever showing the main window, the Twitch docks remain force-hidden. On shutdown, OBSBasic::saveAll() calls Auth::Save(), and TwitchAuth::SaveInternal() persists main->saveState() with those hidden flags, which silently overwrites the user's previous Twitch dock visibility for future launches.
Useful? React with 👍 / 👎.
Description
When OBS is set to "Minimize to system tray when started" the Twitch integration dockable windows are all forced into floating unhidden. Manually minimizing OBS does not have this problem as even undocked floating windows completely outside of the main OBS window will still correctly hide themselves. Only when OBS is set to start minimized do these Twitch dockable windows force themselves into a visible floating state while the rest of OBS is minimized as it should be.
This change records the intended visibility of the docks, hides them, and then restores their saved visibility when OBS is actually shown.
Motivation and Context
Twitch dock windows should follow the same hidden state as the main OBS window during startup minimized to tray, matching the behavior users already get when minimizing OBS manually after startup.
How Has This Been Tested?
Not yet runtime-tested. Opening the PR to get Windows CI artifacts for validation.
git diff --checkpasses locally. PR format checks are passing in CI.Types of changes
Checklist: