diff options
author | Richard Linden <none@none> | 2012-02-23 12:39:59 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-02-23 12:39:59 -0800 |
commit | 48bc2a7c9f6175a5c3179f6fccc98c3d3c50a4c9 (patch) | |
tree | ec895147f9ccd201203e9b23433b9bb921278f03 /indra/llwindow/llwindowwin32.cpp | |
parent | 11d29660aa84a1a8a61e427698715497a57243c2 (diff) | |
parent | 9da67fff0a21ae7af2f99c90be267b089eaafeb6 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience-merge
Diffstat (limited to 'indra/llwindow/llwindowwin32.cpp')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index ebc3203f14..2910c3995a 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -876,6 +876,17 @@ BOOL LLWindowWin32::setSizeImpl(const LLCoordScreen size) return TRUE; } +BOOL LLWindowWin32::setSizeImpl(const LLCoordWindow size) +{ + RECT window_rect = {0, 0, size.mX, size.mY }; + DWORD dw_ex_style = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; + DWORD dw_style = WS_OVERLAPPEDWINDOW; + + AdjustWindowRectEx(&window_rect, dw_style, FALSE, dw_ex_style); + + return setSizeImpl(LLCoordScreen(window_rect.right - window_rect.left, window_rect.bottom - window_rect.top)); +} + // changing fullscreen resolution BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BOOL disable_vsync, const LLCoordScreen * const posp) { @@ -886,12 +897,12 @@ 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; - if (mhRC) + if (mhRC) { auto_show = TRUE; resetDisplayResolution(); @@ -986,7 +997,8 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO dw_ex_style = WS_EX_APPWINDOW; dw_style = WS_POPUP; - // Move window borders out not to cover window contents + // 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); } // If it failed, we don't want to run fullscreen @@ -1014,6 +1026,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO dw_style = WS_OVERLAPPEDWINDOW; } + // don't post quit messages when destroying old windows mPostQuit = FALSE; |