EXP-1832 FIX Viewer Size not persistent across logins
Save *window* width and height, not client areameow-7.2.2
parent
24cf1a475a
commit
4c333d64ca
|
|
@ -891,7 +891,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO
|
|||
S32 height = size.mY;
|
||||
BOOL auto_show = FALSE;
|
||||
|
||||
if (mhRC)
|
||||
if (mhRC)
|
||||
{
|
||||
auto_show = TRUE;
|
||||
resetDisplayResolution();
|
||||
|
|
@ -985,6 +985,10 @@ 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.
|
||||
// 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
|
||||
else
|
||||
|
|
@ -1011,9 +1015,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -12777,7 +12777,7 @@
|
|||
<key>WindowX</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>X coordinate of lower left corner of SL viewer window, relative to primary display (pixels)</string>
|
||||
<string>X coordinate of upper left corner of SL viewer window, relative to upper left corner of primary display (pixels)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
@ -12788,7 +12788,7 @@
|
|||
<key>WindowY</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>Y coordinate of lower left corner of SL viewer window, relative to primary display (pixels)</string>
|
||||
<string>Y coordinate of upper left corner of SL viewer window, relative to upper left corner of primary display (pixels)</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
|
|
|
|||
|
|
@ -2159,9 +2159,13 @@ void LLViewerWindow::reshape(S32 width, S32 height)
|
|||
// tell the OS specific window code about min window size
|
||||
mWindow->setMinSize(min_window_width, min_window_height);
|
||||
|
||||
// Only save size if not maximized
|
||||
gSavedSettings.setU32("WindowWidth", mWindowRectRaw.getWidth());
|
||||
gSavedSettings.setU32("WindowHeight", mWindowRectRaw.getHeight());
|
||||
LLCoordScreen window_rect;
|
||||
if (mWindow->getSize(&window_rect))
|
||||
{
|
||||
// Only save size if not maximized
|
||||
gSavedSettings.setU32("WindowWidth", window_rect.mX);
|
||||
gSavedSettings.setU32("WindowHeight", window_rect.mY);
|
||||
}
|
||||
}
|
||||
|
||||
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);
|
||||
|
|
|
|||
Loading…
Reference in New Issue