summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAnsariel <none@none>2016-11-25 17:28:48 +0100
committerAnsariel <none@none>2016-11-25 17:28:48 +0100
commit7d8bfcfb745c8465f227e184ad819015fe799332 (patch)
tree7bf41d1c7516d9d3075f2f499aafc6f1a73858fc /indra/newview
parent76b3efe01cdf96879c3e7880ee78cccafd36e917 (diff)
Don't resize viewer window if UI scaling didn't change
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewerwindow.cpp4
-rw-r--r--indra/newview/llviewerwindow.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index cce988c2fe..de71443067 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1599,17 +1599,19 @@ BOOL LLViewerWindow::handleDeviceChange(LLWindow *window)
return FALSE;
}
-void LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
+BOOL LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height)
{
if (ui_scale_factor >= MIN_UI_SCALE && ui_scale_factor <= MAX_UI_SCALE)
{
gSavedSettings.setF32("UIScaleFactor", ui_scale_factor);
LLViewerWindow::reshape(window_width, window_height);
mResDirty = true;
+ return TRUE;
}
else
{
LL_WARNS() << "DPI change caused UI scale to go out of bounds: " << ui_scale_factor << LL_ENDL;
+ return FALSE;
}
}
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 72b7370621..a134dfaaa9 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -211,7 +211,7 @@ public:
/*virtual*/ void handleDataCopy(LLWindow *window, S32 data_type, void *data);
/*virtual*/ BOOL handleTimerEvent(LLWindow *window);
/*virtual*/ BOOL handleDeviceChange(LLWindow *window);
- /*virtual*/ void handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
+ /*virtual*/ BOOL handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 window_width, S32 window_height);
/*virtual*/ void handlePingWatchdog(LLWindow *window, const char * msg);
/*virtual*/ void handlePauseWatchdog(LLWindow *window);