Skip to content

Fix scale startup issues on MacOS - #6215

Merged
akleshchev merged 1 commit into
release/26.4from
andreyk/viewer_p700_3
Aug 29, 2026
Merged

Fix scale startup issues on MacOS#6215
akleshchev merged 1 commit into
release/26.4from
andreyk/viewer_p700_3

Conversation

@akleshchev

Copy link
Copy Markdown
Contributor

UI scale sometimes starts as massive on macOS, which is not visible in logs. What is also missing from logs is handleResize, so I assume that is the cause of the bug. Making viewDidMoveToWindow mark size as dirty even if size didn't change.

Snippet:

2026-08-28T16:59:27Z DEBUG #Window# newview/llviewerwindow.cpp(2046) LLViewerWindow : Display init: screen_size=3026x1794 system_ui_size=2 pixel_aspect_ratio=1 saved_UIScaleFactor=1.125 ResetUIScaleOnFirstRun=0
2026-08-28T16:59:27Z DEBUG #Window# newview/llviewerwindow.cpp(2061) LLViewerWindow : Display scale computed: ui_scale_factor=2.25 mDisplayScale={ 2.25, 2.25 } (clamped_to=[0.75, 7])2026-08-28T16:59:27Z DEBUG 2026-08-28T16:59:27Z DEBUG #Window# newview/llviewerwindow.cpp(2095) LLViewerWindow : Loading feature tables.
2026-08-28T16:59:29Z INFO #InitInfo# newview/llappviewer.cpp(1009) init : Window is initialized.
2026-08-28T16:59:29Z DEBUG #Window# newview/llviewerdisplay.cpp(176) display_startup : First display_startup frame
2026-08-28T16:59:29Z DEBUG #Window# newview/llviewerdisplay.cpp(176) display_startup : First display_startup frame
2026-08-28T16:59:29Z INFO #AppInit# newview/llstartup.cpp(3263) setStartupState : STATE_BROWSER_INIT --> STATE_LOGIN_SHOW
2026-08-28T16:59:29Z INFO #AppInit# newview/llstartup.cpp(2652) login_show : Initializing Login Screen

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to fix macOS startup UI scaling issues by ensuring the viewer marks its resolution/scale state as “dirty” even when the view attaches to a window without an immediate size change, making the eventual reshape/scale computation happen reliably.

Changes:

  • Add a new window callback (handleRequestResolutionUpdate) and a macOS bridge (callRequestResolutionUpdate) to request a deferred resolution/scale update.
  • Update macOS viewDidMoveToWindow to request a resolution update when the backing size doesn’t appear to change immediately.
  • Adjust LLViewerWindow::checkSettings() to reshape using the live window size queried from mWindow->getSize().

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
indra/newview/llviewerwindow.h Declares the new handleRequestResolutionUpdate callback on LLViewerWindow.
indra/newview/llviewerwindow.cpp Implements the callback and uses live mWindow->getSize() during deferred reshapes.
indra/llwindow/llwindowcallbacks.h Extends the window callback interface with handleRequestResolutionUpdate.
indra/llwindow/llwindowcallbacks.cpp Adds a default no-op implementation for the new callback.
indra/llwindow/llwindowmacosx-objc.h Exposes callRequestResolutionUpdate() to ObjC/ObjC++ code.
indra/llwindow/llwindowmacosx.cpp Implements callRequestResolutionUpdate() to forward into callbacks.
indra/llwindow/llopenglview-objc.mm Triggers callRequestResolutionUpdate() from viewDidMoveToWindow when appropriate.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread indra/newview/llviewerwindow.cpp
Comment thread indra/llwindow/llopenglview-objc.mm Outdated
@akleshchev
akleshchev force-pushed the andreyk/viewer_p700_3 branch 5 times, most recently from 537684c to 3b56368 Compare August 28, 2026 22:41
@akleshchev

Copy link
Copy Markdown
Contributor Author

QA confirmed that this works.

@akleshchev
akleshchev merged commit e47869b into release/26.4 Aug 29, 2026
16 checks passed
@akleshchev
akleshchev deleted the andreyk/viewer_p700_3 branch August 29, 2026 08:50
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants