Skip to content

Resize browser docks on screen change - #568

Open
WizardCM wants to merge 1 commit into
obsproject:masterfrom
WizardCM:fix-multi-display-dpi
Open

WizardCM wants to merge 1 commit into
obsproject:masterfrom
WizardCM:fix-multi-display-dpi

Conversation

@WizardCM

@WizardCM WizardCM commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Description

This ensures that if the DPI across screens is different, the browsers and their containers are intentionally resized correctly.

This is the "simplest" solution, rather than digging up DPI changed events that may or may not be reliable.

Before (not 100% of the time, but often enough):

image image

After

image image

Initially I tried just calling Resize() but that only resized the wrapper and not both, which ended up behaving incorrectly.

Motivation and Context

Fixes obsproject/obs-studio#14276

How Has This Been Tested?

Built and run on Windows 10 where the main display's DPI is 125% and other displays are 100%. Drag the window quickly between them.

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.

This ensures that if the DPI across screens is different, the browsers
and their containers are intentionally resized correctly.
@WizardCM WizardCM added the kind/bug Categorizes issue or PR as related to a bug. label Nov 30, 2026
Comment thread panel/browser-panel.cpp
Comment on lines +188 to +189
connect(window, &QWindow::screenChanged, this,
[this]() { QCoreApplication::postEvent(this, new QResizeEvent(size(), size())); });

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Debating moving this out of the macOS check, tying it to this instead of window.
Need more insight from a macOS user with multiple displays first.

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

Labels

kind/bug Categorizes issue or PR as related to a bug.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrectly scaled content in browser docks

1 participant