summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowwin32.cpp
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/llwindow/llwindowwin32.cpp
parent76b3efe01cdf96879c3e7880ee78cccafd36e917 (diff)
Don't resize viewer window if UI scaling didn't change
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r--indra/llwindow/llwindowwin32.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp
index 062f922006..321792eb14 100644
--- a/indra/llwindow/llwindowwin32.cpp
+++ b/indra/llwindow/llwindowwin32.cpp
@@ -2627,15 +2627,17 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_
lprc_new_scale = (LPRECT)l_param;
S32 new_width = lprc_new_scale->right - lprc_new_scale->left;
S32 new_height = lprc_new_scale->bottom - lprc_new_scale->top;
- window_imp->mCallbacks->handleDPIChanged(window_imp, new_scale, new_width, new_height);
- SetWindowPos(h_wnd,
- HWND_TOP,
- lprc_new_scale->left,
- lprc_new_scale->top,
- new_width,
- new_height,
- SWP_NOZORDER | SWP_NOACTIVATE);
- return 0;
+ if (window_imp->mCallbacks->handleDPIChanged(window_imp, new_scale, new_width, new_height))
+ {
+ SetWindowPos(h_wnd,
+ HWND_TOP,
+ lprc_new_scale->left,
+ lprc_new_scale->top,
+ new_width,
+ new_height,
+ SWP_NOZORDER | SWP_NOACTIVATE);
+ }
+ return 0;
}
case WM_SETFOCUS: