diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2016-11-29 12:25:49 +0000 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2016-11-29 12:25:49 +0000 |
commit | b40ac4325cb234a05abcf43842b82669d76603d0 (patch) | |
tree | a56c93b7361e0482b7296c6958e05ddee05e72b1 /indra/llwindow/llwindowwin32.cpp | |
parent | fb9cb882728f512216538d185ff3caeff6f8b148 (diff) | |
parent | 7d40f756b031d519d6aaa089d610333e2718cbb2 (diff) |
Merged in Ansariel/viewer-neko-ui-scaling (pull request #98)
More improvements for UI scaling detection
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 20 |
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: |