From 3a9706136a16caeeb85d9c76828835f1b266800f Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Thu, 27 Aug 2026 21:06:02 +0300 Subject: p#700 handleWindowDidChangeScreen should schedule an update And improved relevant logging. --- indra/newview/llviewerwindow.cpp | 75 ++++++++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 23 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 32af06cd0d..e3e8cd1fce 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1578,6 +1578,7 @@ void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height) { reshape(width, height); mResDirty = true; + LL_DEBUGS("Window") << "handleResize, new width: " << width << " height: " << height << LL_ENDL; } // The top-level window has gained focus (e.g. via ALT-TAB) @@ -1877,6 +1878,10 @@ bool LLViewerWindow::handleWindowDidChangeScreen(LLWindow *window) LLCoordScreen window_rect; mWindow->getSize(&window_rect); reshape(window_rect.mX, window_rect.mY); + // The window may still be transitioning between states, + // schedule an update at checkSettings() + mResDirty = true; + LL_DEBUGS("Window") << "Window did change screen, new size: " << window_rect.mX << "x" << window_rect.mY << LL_ENDL; return true; } @@ -2621,6 +2626,15 @@ void LLViewerWindow::reshape(S32 width, S32 height) mWindowRectRaw.mRight = mWindowRectRaw.mLeft + width; mWindowRectRaw.mTop = mWindowRectRaw.mBottom + height; + LL_DEBUGS("Window") << "reshape called:"; + LLCoordWindow live_size; + mWindow->getSize(&live_size); + LL_CONT << " args=" << width << "x" << height + << " live_getSize=" << live_size.mX << "x" << live_size.mY + << " current_mDisplayScale=" << mDisplayScale + << " systemUISize=" << mWindow->getSystemUISize() + << LL_ENDL; + //glViewport(0, 0, width, height ); LLViewerCamera * camera = LLViewerCamera::getInstance(); // simpleton, might not exist @@ -2954,12 +2968,13 @@ bool LLViewerWindow::handleKeyUp(KEY key, MASK mask) { if (keyboard_focus->handleKeyUp(key, mask, false)) { - LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned true" << LL_ENDL; + LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp and it returned true" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key, mask); return true; } - else { - LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp an it returned false" << LL_ENDL; + else + { + LL_DEBUGS() << "LLviewerWindow::handleKeyUp - in 'traverse up' - no loops seen... just called keyboard_focus->handleKeyUp and it returned false" << LL_ENDL; } } @@ -3175,17 +3190,19 @@ bool LLViewerWindow::handleKey(KEY key, MASK mask) if (keyboard_focus->handleKey(key, mask, false)) { - LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned true" << LL_ENDL; + LL_DEBUGS("Window") << "LLViewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey and it returned true" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return true; - } else { - LL_DEBUGS() << "LLviewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey an it returned false" << LL_ENDL; + } + else + { + LL_DEBUGS("Window") << "LLViewerWindow::handleKey - in 'traverse up' - no loops seen... just called keyboard_focus->handleKey and it returned false" << LL_ENDL; } } if( LLToolMgr::getInstance()->getCurrentTool()->handleKey(key, mask) ) { - LL_DEBUGS() << "LLviewerWindow::handleKey toolbar handling?" << LL_ENDL; + LL_DEBUGS("Window") << "LLViewerWindow::handleKey toolbar handling?" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return true; } @@ -3193,7 +3210,7 @@ bool LLViewerWindow::handleKey(KEY key, MASK mask) // Try for a new-format gesture if (LLGestureMgr::instance().triggerGesture(key, mask)) { - LL_DEBUGS() << "LLviewerWindow::handleKey new gesture feature" << LL_ENDL; + LL_DEBUGS("Window") << "LLViewerWindow::handleKey new gesture feature" << LL_ENDL; LLViewerEventRecorder::instance().logKeyEvent(key,mask); return true; } @@ -3305,7 +3322,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) mouse_captor->handleScrollWheel(local_x, local_y, clicks); if (LLView::sDebugMouseHandling) { - LL_INFOS() << "Scroll Wheel handled by captor " << mouse_captor->getName() << LL_ENDL; + LL_INFOS("Window") << "Scroll Wheel handled by captor " << mouse_captor->getName() << LL_ENDL; } return; } @@ -3329,7 +3346,7 @@ void LLViewerWindow::handleScrollWheel(S32 clicks) } else if (LLView::sDebugMouseHandling) { - LL_INFOS() << "Scroll Wheel not handled by view" << LL_ENDL; + LL_INFOS("Window") << "Scroll Wheel not handled by view" << LL_ENDL; } // Zoom the camera in and out behavior @@ -3360,7 +3377,7 @@ void LLViewerWindow::handleScrollHWheel(S32 clicks) mouse_captor->handleScrollHWheel(local_x, local_y, clicks); if (LLView::sDebugMouseHandling) { - LL_INFOS() << "Scroll Horizontal Wheel handled by captor " << mouse_captor->getName() << LL_ENDL; + LL_INFOS("Window") << "Scroll Horizontal Wheel handled by captor " << mouse_captor->getName() << LL_ENDL; } return; } @@ -3384,7 +3401,7 @@ void LLViewerWindow::handleScrollHWheel(S32 clicks) } else if (LLView::sDebugMouseHandling) { - LL_INFOS() << "Scroll Horizontal Wheel not handled by view" << LL_ENDL; + LL_INFOS("Window") << "Scroll Horizontal Wheel not handled by view" << LL_ENDL; } return; @@ -3588,7 +3605,7 @@ void LLViewerWindow::updateUI() } if (child_count_timer.hasExpired()) { - LL_INFOS() << "gMenuHolder child count: " << gMenuHolder->getChildCount() << LL_ENDL; + LL_INFOS("Window") << "gMenuHolder child count: " << gMenuHolder->getChildCount() << LL_ENDL; std::vector local_child_vec; LLView::child_list_t child_list = *gMenuHolder->getChildList(); for (auto child : child_list) @@ -3603,7 +3620,7 @@ void LLViewerWindow::updateUI() std::set_difference(child_vec.begin(), child_vec.end(), local_child_vec.begin(), local_child_vec.end(), std::inserter(out_vec, out_vec.begin())); if (!out_vec.empty()) { - LL_INFOS() << "gMenuHolder removal diff size: '"<getPositionGlobal() - point_global) << LL_ENDL; + LL_INFOS("Window") << "approx intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL; } else { - LL_INFOS() << "good intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL; + LL_INFOS("Window") << "good intersection at " << (objectp->getPositionGlobal() - point_global) << LL_ENDL; } return intersect; @@ -5000,7 +5017,7 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save while( -1 != err // Search until the file is not found (i.e., stat() gives an error). && is_snapshot_name_loc_set); // Or stop if we are rewriting. - LL_INFOS() << "Saving snapshot to " << filepath << LL_ENDL; + LL_INFOS("Window") << "Saving snapshot to " << filepath << LL_ENDL; if (image->save(filepath)) { playSnapshotAnimAndSound(); @@ -5054,7 +5071,7 @@ void LLViewerWindow::movieSize(S32 new_width, S32 new_height) bool LLViewerWindow::saveSnapshot(const std::string& filepath, S32 image_width, S32 image_height, bool show_ui, bool show_hud, bool do_rebuild, bool show_balance, LLSnapshotModel::ESnapshotLayerType type, LLSnapshotModel::ESnapshotFormat format) { - LL_INFOS() << "Saving snapshot to: " << filepath << LL_ENDL; + LL_INFOS("Window") << "Saving snapshot to: " << filepath << LL_ENDL; LLPointer raw = new LLImageRaw; bool success = rawSnapshot(raw, image_width, image_height, true, false, show_ui, show_hud, do_rebuild, show_balance); @@ -5934,7 +5951,7 @@ void LLViewerWindow::stopGL() //especially be careful to put anything behind gTextureList.destroyGL(save_state); if (!gGLManager.mIsDisabled) { - LL_INFOS() << "Shutting down GL..." << LL_ENDL; + LL_INFOS("Window") << "Shutting down GL..." << LL_ENDL; // Pause texture decode threads (will get unpaused during main loop) LLAppViewer::getTextureCache()->pause(); @@ -5998,7 +6015,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) //especially, be careful to put something before gTextureList.restoreGL(); if (gGLManager.mIsDisabled) { - LL_INFOS() << "Restoring GL..." << LL_ENDL; + LL_INFOS("Window") << "Restoring GL..." << LL_ENDL; gGLManager.mIsDisabled = false; initGLDefaults(); @@ -6032,7 +6049,7 @@ void LLViewerWindow::restoreGL(const std::string& progress_message) setShowProgress(true); setProgressString(progress_message); } - LL_INFOS() << "...Restoring GL done" << LL_ENDL; + LL_INFOS("Window") << "...Restoring GL done" << LL_ENDL; if(!LLAppViewer::instance()->restoreErrorTrap()) { LL_WARNS() << " Someone took over my signal/exception handler (post restoreGL)!" << LL_ENDL; @@ -6100,7 +6117,19 @@ void LLViewerWindow::calcDisplayScale() if (display_scale != mDisplayScale) { - LL_INFOS() << "Setting display scale to " << display_scale << " for ui scale: " << ui_scale_factor << LL_ENDL; + LL_INFOS("Window") << "Setting display scale to " << display_scale << " for ui scale: " << ui_scale_factor << LL_ENDL; + + LL_DEBUGS("Window") << "calcDisplayScale changing:"; + + LLCoordWindow win_size; + mWindow->getSize(&win_size); + LL_CONT << " old=" << mDisplayScale + << " new=" << display_scale + << " UIScaleFactor=" << gSavedSettings.getF32("UIScaleFactor") + << " systemUISize=" << mWindow->getSystemUISize() + << " windowSize=" << win_size.mX << "x" << win_size.mY + << " mWindowRectRaw=" << mWindowRectRaw.getWidth() << "x" << mWindowRectRaw.getHeight() + << LL_ENDL; mDisplayScale = display_scale; // Init default fonts -- cgit v1.3 From e47869b667ae34b524f303f7ab2b1c1c5d661278 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:59:44 +0300 Subject: p#700 Add a postponed size update on viewDidMoveToWindow --- indra/llwindow/llopenglview-objc.mm | 46 ++++++++++++++++++++++++++++++++---- indra/llwindow/llwindowcallbacks.cpp | 4 ++++ indra/llwindow/llwindowcallbacks.h | 1 + indra/llwindow/llwindowmacosx-objc.h | 2 ++ indra/llwindow/llwindowmacosx.cpp | 17 +++++++++++-- indra/llwindow/llwindowmacosx.h | 5 ++++ indra/newview/llviewerwindow.cpp | 21 ++++++++++++++-- indra/newview/llviewerwindow.h | 1 + 8 files changed, 89 insertions(+), 8 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 403103991e..0786449286 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -137,6 +137,18 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void)viewDidMoveToWindow { + // viewDidMoveToWindow is called both when the view is attached to a window + // and when it is detached (window == nil). + [NSObject cancelPreviousPerformRequestsWithTarget:self + selector:@selector(performDeferredResolutionUpdate) + object:nil]; + + if (![self window]) + { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + return; + } + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowResized:) name:NSWindowDidResizeNotification object:[self window]]; @@ -157,11 +169,37 @@ attributedStringInfo getSegments(NSAttributedString *str) object:[self window]]; - NSRect wnd_rect = [[self window] frame]; - NSRect dev_rect = [self convertRectToBacking:wnd_rect]; - if (!NSEqualSizes(wnd_rect.size,dev_rect.size)) + if (windowCallbacksReady()) + { + NSRect wnd_rect = [[self window] frame]; + NSRect dev_rect = [self convertRectToBacking:wnd_rect]; + if (!NSEqualSizes(wnd_rect.size,dev_rect.size)) + { + // If window size actually changes, update size immediately + callResize(dev_rect.size.width, dev_rect.size.height); + } + else + { + // Defer size update to let the window settle on its final display + // before checkSettings() reads the live backing size. + callRequestResolutionUpdate(); + } + } + else + { + // Defer so that mCallbacks is the real callbacks object, + // not the null_callbacks used during LLWindowMacOSX construction. + // afterDelay will fire on the next loop iteration. + NSLog(@"viewDidMoveToWindow triggered, but callbacks not ready, postponing resolution update", nil); + [self performSelector:@selector(performDeferredResolutionUpdate) withObject:nil afterDelay:0]; + } +} + +- (void)performDeferredResolutionUpdate +{ + if ([self window]) { - callResize(dev_rect.size.width, dev_rect.size.height); + callRequestResolutionUpdate(); } } diff --git a/indra/llwindow/llwindowcallbacks.cpp b/indra/llwindow/llwindowcallbacks.cpp index f997aebb9d..b16d0ffce8 100644 --- a/indra/llwindow/llwindowcallbacks.cpp +++ b/indra/llwindow/llwindowcallbacks.cpp @@ -156,6 +156,10 @@ void LLWindowCallbacks::handleResize(LLWindow *window, const S32 width, const S3 { } +void LLWindowCallbacks::handleRequestResolutionUpdate(LLWindow* window) +{ +} + void LLWindowCallbacks::handleFocus(LLWindow *window) { LL_WARNS("COCOA") << "Called handleFocus proto" << LL_ENDL; diff --git a/indra/llwindow/llwindowcallbacks.h b/indra/llwindow/llwindowcallbacks.h index cd54ccd7c9..1fcf2974b5 100644 --- a/indra/llwindow/llwindowcallbacks.h +++ b/indra/llwindow/llwindowcallbacks.h @@ -63,6 +63,7 @@ public: virtual void handleScrollWheel(LLWindow *window, S32 clicks); virtual void handleScrollHWheel(LLWindow *window, S32 clicks); virtual void handleResize(LLWindow *window, S32 width, S32 height); + virtual void handleRequestResolutionUpdate(LLWindow* window); virtual void handleFocus(LLWindow *window); virtual void handleFocusLost(LLWindow *window); virtual void handleMenuSelect(LLWindow *window, S32 menu_item); diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index ec9afb1844..a9698bc0e1 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -140,6 +140,7 @@ void callLeftMouseDown(float *pos, unsigned int mask); void callLeftMouseUp(float *pos, unsigned int mask); void callDoubleClick(float *pos, unsigned int mask); void callResize(unsigned int width, unsigned int height); +void callRequestResolutionUpdate(); void callMouseMoved(float *pos, unsigned int mask); void callMouseDragged(float *pos, unsigned int mask); void callScrollMoved(float deltaX, float deltaY); @@ -157,6 +158,7 @@ void callFocusLost(); void callModifier(unsigned int mask); void callQuitHandler(); void commitCurrentPreedit(GLViewRef glView); +bool windowCallbacksReady(); #include void callHandleDragEntered(std::string url); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 7cb681aefe..7310e5b2fa 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -165,6 +165,7 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, // Route them to a dummy callback structure until the end of constructor. LLWindowCallbacks null_callbacks; mCallbacks = &null_callbacks; + mIsConstructing = true; // Voodoo for calling cocoa from carbon (see llwindowmacosx-objc.mm). setupCocoa(); @@ -236,9 +237,8 @@ LLWindowMacOSX::LLWindowMacOSX(LLWindowCallbacks* callbacks, } mCallbacks = callbacks; + mIsConstructing = false; stop_glerror(); - - } // These functions are used as wrappers for our internal event handling callbacks. @@ -412,6 +412,14 @@ void callResize(unsigned int width, unsigned int height) } } +void callRequestResolutionUpdate() +{ + if (gWindowImplementation && gWindowImplementation->getCallbacks()) + { + gWindowImplementation->getCallbacks()->handleRequestResolutionUpdate(gWindowImplementation); + } +} + void callMouseMoved(float *pos, MASK mask) { if (!gWindowImplementation) @@ -705,6 +713,11 @@ void getPreeditLocation(float *location, unsigned int length) } } +bool windowCallbacksReady() +{ + return gWindowImplementation && !gWindowImplementation->isConstructing(); +} + void LLWindowMacOSX::updateMouseDeltas(float* deltas) { if (mCursorDecoupled) diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 9534eadf8e..cc6490bb62 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -147,6 +147,10 @@ public: // enable or disable multithreaded GL static void setUseMultGL(bool use_mult_gl); + // During construction null_callbacks are used, + // this is a way to determine when callbacks are ready. + bool isConstructing() const { return mIsConstructing; } + protected: LLWindowMacOSX(LLWindowCallbacks* callbacks, const std::string& title, const std::string& name, int x, int y, int width, int height, U32 flags, @@ -223,6 +227,7 @@ protected: bool mMinimized; U32 mFSAASamples; bool mForceRebuild; + bool mIsConstructing = true; S32 mDragOverrideCursor; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e3e8cd1fce..e44dbd8f0b 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1581,6 +1581,12 @@ void LLViewerWindow::handleResize(LLWindow *window, S32 width, S32 height) LL_DEBUGS("Window") << "handleResize, new width: " << width << " height: " << height << LL_ENDL; } +void LLViewerWindow::handleRequestResolutionUpdate(LLWindow* window) +{ + requestResolutionUpdate(); + LL_DEBUGS("Window") << "handleRequestResolutionUpdate: mResDirty set" << LL_ENDL; +} + // The top-level window has gained focus (e.g. via ALT-TAB) void LLViewerWindow::handleFocus(LLWindow *window) { @@ -2043,7 +2049,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) } else { - LL_DEBUGS("Window") << "Display init diagnostics:" + LL_DEBUGS("Window") << "Display init:" << " screen_size=" << scr.mX << "x" << scr.mY << " system_ui_size=" << mWindow->getSystemUISize() << " pixel_aspect_ratio=" << mWindow->getPixelAspectRatio() @@ -6091,7 +6097,18 @@ void LLViewerWindow::checkSettings() // We want to update the resolution AFTER the states getting refreshed not before. if (mResDirty) { - reshape(getWindowWidthRaw(), getWindowHeightRaw()); + LLCoordScreen window_size; + if (mWindow->getSize(&window_size)) + { + reshape(window_size.mX, window_size.mY); + } + else + { + S32 width = getWindowWidthRaw(); + S32 height = getWindowHeightRaw(); + LL_WARNS() << "Failed to get window size, using raw window size " << width << "x" << height << " instead" << LL_ENDL; + reshape(width, height); + } mResDirty = false; } } diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h index 06d49df56d..e09e8fee14 100644 --- a/indra/newview/llviewerwindow.h +++ b/indra/newview/llviewerwindow.h @@ -221,6 +221,7 @@ public: void handleMouseDragged(LLWindow *window, LLCoordGL pos, MASK mask); /*virtual*/ void handleMouseLeave(LLWindow *window); /*virtual*/ void handleResize(LLWindow *window, S32 x, S32 y); + /*virtual*/ void handleRequestResolutionUpdate(LLWindow* window); /*virtual*/ void handleFocus(LLWindow *window); /*virtual*/ void handleFocusLost(LLWindow *window); /*virtual*/ bool handleActivate(LLWindow *window, bool activated); -- cgit v1.3 From 9818c3e0077dcf262b121370ef191b56c224d51a Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> Date: Fri, 28 Aug 2026 20:59:44 +0300 Subject: p#700 Fix issue with tittle bar on Windows --- indra/llwindow/llwindow.h | 5 +++++ indra/llwindow/llwindowmacosx.h | 4 ++++ indra/llwindow/llwindowwin32.h | 4 ++++ indra/newview/llviewerwindow.cpp | 4 ++-- 4 files changed, 15 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 327323b018..3f06bf1a50 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -78,7 +78,12 @@ public: virtual void restore() = 0; bool getFullscreen() { return mFullscreen; }; virtual bool getPosition(LLCoordScreen *position) = 0; + + // Returns the platform-defined window size in physical (backing) pixels. + // On macOS: backing content view size (excludes title bar). + // On Windows: outer window frame size (includes title bar and borders). virtual bool getSize(LLCoordScreen *size) = 0; + virtual bool getSize(LLCoordWindow *size) = 0; virtual bool setPosition(LLCoordScreen position) = 0; bool setSize(LLCoordScreen size); diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index cc6490bb62..a9475c84cc 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -50,7 +50,11 @@ public: void restore() override; bool getFullscreen(); bool getPosition(LLCoordScreen *position) override; + + // Content view size in backing pixels (excludes title bar). + // Note: on Windows, getSize(LLCoordScreen) returns the outer window frame size (includes title bar and borders). bool getSize(LLCoordScreen *size) override; + bool getSize(LLCoordWindow *size) override; bool setPosition(LLCoordScreen position) override; bool setSizeImpl(LLCoordScreen size) override; diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 0b104c6da8..9ccd0a3ee2 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -62,7 +62,11 @@ public: void restore() override; bool getFullscreen(); bool getPosition(LLCoordScreen *position) override; + + // Outer window frame size in pixels (includes title bar and borders). + // Note OS Specific behavior: On macOS excludes title bar. bool getSize(LLCoordScreen *size) override; + bool getSize(LLCoordWindow *size) override; bool setPosition(LLCoordScreen position) override; bool setSizeImpl(LLCoordScreen size) override; diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index e44dbd8f0b..637c03cdaa 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -6094,10 +6094,10 @@ void LLViewerWindow::checkSettings() mStatesDirty = false; } - // We want to update the resolution AFTER the states getting refreshed not before. if (mResDirty) { - LLCoordScreen window_size; + // Deferred resolution update after states have been refreshed. + LLCoordWindow window_size; if (mWindow->getSize(&window_size)) { reshape(window_size.mX, window_size.mY); -- cgit v1.3