You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: frontend: in studio mode the program view keeps its old size after the window moves to a screen with another pixel ratio #4010
frontend/widgets/OBSBasic_StudioMode.cpp.hpp:37: the program view recomputes its scale and position (ResizeProgram) only on DisplayResized. The preview does not have this problem: OBSBasic also connects the window's screenChanged to ResizePreview (frontend/widgets/OBSBasic.cpp.hpp:253).
Class
Logic error (layout not recomputed).
How it is reached
macOS 27.2, obs-rust 1.0.1-beta.20261107 (arm64), a Retina display (pixel ratio 2) and a 2560x1440 display (pixel ratio 1). In studio mode, drag the OBS window from one display to the other. The window keeps its size in points, so Qt sends no resize event, but the pixel size of each display changes. The preview is drawn at the new size; the program view keeps the scale and position of the old pixel ratio until the window is resized by hand.
The code is inherited from upstream OBS without change, so upstream likely has the same bug (not checked there).
Proposed fix and failing test
Fix: emit DisplayResized() at the end of the screenChanged handler in OBSQTDisplay, so every display that lays out on that signal (program view, projectors, the properties preview) follows a pixel ratio change.
Test: a Qt test that creates a studio-mode program display, records ResizeProgram's result, changes the window's screen or device pixel ratio without resizing it, and checks that the program scale changed. It fails now because ResizeProgram is not called.
One PR. RED: a Qt test on the offscreen platform with two screens (pixel ratio 1 and 2) moves an OBSQTDisplay to the other screen without a resize and expects DisplayResized. Today the signal does not come. GREEN: OBSQTDisplay's screenChanged handler emits DisplayResized(), so the studio-mode program view (and every other display that lays out on that signal) follows the new pixel ratio. I will check the result by hand on macOS with a Retina and a non-Retina display. First PR today or tomorrow.
Checked by hand on macOS 27.2 (Apple silicon) with a build of master at 9a95b46, which has #4052.
Studio Mode on, with a Retina display (pixel ratio 2) and an external display with pixel ratio 1.
Moved the OBS window from the Retina display to the external display, and back.
Each time, the Program view kept the correct scale and position at once. It needed no manual window resize, and the relayout was not visible.
Fixed by #4052: OBSQTDisplay now emits DisplayResized when its screen changes. The Qt test test_display_screen_change covers it on the offscreen platform. Nothing is left on this issue.
Activity
vpacher commentedon Nov 8, 2026
Claiming: #4010
OBSQTDisplayto the other screen without a resize and expectsDisplayResized. Today the signal does not come. GREEN:OBSQTDisplay'sscreenChangedhandler emitsDisplayResized(), so the studio-mode program view (and every other display that lays out on that signal) follows the new pixel ratio. I will check the result by hand on macOS with a Retina and a non-Retina display. First PR today or tomorrow.test(frontend): link the display test without the frontend's platform…
test(frontend): set the display test's screen before its window exist…
test(frontend): send the display test macOS's screen change, no resiz…
fix(frontend): report a screen change as a resize to the display's la…
frontend: report a screen change as a resize to the display's layout (o…
vpacher commentedon Nov 8, 2026
Checked by hand on macOS 27.2 (Apple silicon) with a build of master at 9a95b46, which has #4052.
Fixed by #4052:
OBSQTDisplaynow emitsDisplayResizedwhen its screen changes. The Qt testtest_display_screen_changecovers it on the offscreen platform. Nothing is left on this issue.