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(-) 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