Skip to content

frontend: Hide Twitch docks on minimized start#1

Closed
BeekeeperAlex wants to merge 1 commit intomasterfrom
fix/twitch-docks-start-hidden
Closed

frontend: Hide Twitch docks on minimized start#1
BeekeeperAlex wants to merge 1 commit intomasterfrom
fix/twitch-docks-start-hidden

Conversation

@BeekeeperAlex
Copy link
Copy Markdown
Owner

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 --check passes locally. PR format checks are passing in CI.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have read the contributing document.
  • My code has been run through clang-format.
  • My code follows the project's style guidelines
  • My code is not on the master branch.
  • My code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

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.
@BeekeeperAlex
Copy link
Copy Markdown
Owner Author

Closing this duplicate fork-only PR. The upstream PR is obsproject#13368.

@BeekeeperAlex BeekeeperAlex deleted the fix/twitch-docks-start-hidden branch April 28, 2026 01:21
@BeekeeperAlex BeekeeperAlex restored the fix/twitch-docks-start-hidden branch April 28, 2026 01:22
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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())
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant