diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-02-13 19:57:35 +0200 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2012-02-13 19:57:35 +0200 |
commit | 12b4862330adcaca275967d45e97395ef7709c8f (patch) | |
tree | 6e4a4eb3e166f1d3d766f6ed6294892cb6842c43 /indra/llwindow/llwindowwin32.cpp | |
parent | 47425d67fe032804d8a10123cd1a7daf9bff84f7 (diff) |
EXP-1832 FIXED Viewer Size not persistent across logins.
Symptoms: Viewer window shrank by a few pixels on each startup.
Reason: We used client rect (which did not include the window border) to create the viewer window.
Solution: Convert client rect into window rect, i.e. expand it by the border size.
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index ebc3203f14..3a3e4a90dd 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -886,7 +886,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO DWORD current_refresh; DWORD dw_ex_style; DWORD dw_style; - RECT window_rect; + RECT window_rect = {0, 0, 0, 0}; S32 width = size.mX; S32 height = size.mY; BOOL auto_show = FALSE; @@ -985,9 +985,6 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO window_rect.bottom = (long) height; dw_ex_style = WS_EX_APPWINDOW; dw_style = WS_POPUP; - - // Move window borders out not to cover window contents - AdjustWindowRectEx(&window_rect, dw_style, FALSE, dw_ex_style); } // If it failed, we don't want to run fullscreen else @@ -1014,6 +1011,10 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO dw_style = WS_OVERLAPPEDWINDOW; } + // Move window borders out not to cover window contents. + // This converts client rect to window rect, i.e. expands it by the window border size. + AdjustWindowRectEx(&window_rect, dw_style, FALSE, dw_ex_style); + // don't post quit messages when destroying old windows mPostQuit = FALSE; |