summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-02-09 15:58:28 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-02-10 23:18:33 +0200
commitbc84cb02a2f324792deca766a4179d028473a282 (patch)
treeecb69efebcc67e9b88c0f9edddb5ed973290d5da /indra/newview
parent3a251b1b9e753589dd12e25236e77275c9010566 (diff)
#3332 Issues with text buffer updates
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp10
-rw-r--r--indra/newview/llviewerwindow.h1
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 8915e68298..5a7d507b74 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1746,11 +1746,11 @@ bool LLViewerWindow::handleDeviceChange(LLWindow *window)
bool LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
{
+ LLFontGL::sResolutionGeneration++;
if (ui_scale_factor >= MIN_UI_SCALE && ui_scale_factor <= MAX_UI_SCALE)
{
LLViewerWindow::reshape(window_width, window_height);
mResDirty = true;
- LLFontGL::sResolutionGeneration++;
return true;
}
else
@@ -1760,6 +1760,12 @@ bool LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32
}
}
+bool LLViewerWindow::handleDisplayChanged()
+{
+ LLFontGL::sResolutionGeneration++;
+ return false;
+}
+
bool LLViewerWindow::handleWindowDidChangeScreen(LLWindow *window)
{
LLCoordScreen window_rect;
@@ -1928,6 +1934,7 @@ LLViewerWindow::LLViewerWindow(const Params& p)
mDisplayScale.setVec(llmax(1.f / mWindow->getPixelAspectRatio(), 1.f), llmax(mWindow->getPixelAspectRatio(), 1.f));
mDisplayScale *= ui_scale_factor;
LLUI::setScaleFactor(mDisplayScale);
+ LLFontGL::sResolutionGeneration++;
{
LLCoordWindow size;
@@ -2495,6 +2502,7 @@ void LLViewerWindow::reshape(S32 width, S32 height)
bool display_scale_changed = mDisplayScale != LLUI::getScaleFactor();
LLUI::setScaleFactor(mDisplayScale);
+ LLFontGL::sResolutionGeneration++;
// update our window rectangle
mWindowRectScaled.mRight = mWindowRectScaled.mLeft + ll_round((F32)width / mDisplayScale.mV[VX]);
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 1b995ea650..fbc2c58fbf 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -225,6 +225,7 @@ public:
/*virtual*/ bool handleTimerEvent(LLWindow *window);
/*virtual*/ bool handleDeviceChange(LLWindow *window);
/*virtual*/ bool handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
+ /*virtual*/ bool handleDisplayChanged();
/*virtual*/ bool handleWindowDidChangeScreen(LLWindow *window);
/*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg);