diff options
author | Richard Linden <none@none> | 2012-02-16 15:45:43 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2012-02-16 15:45:43 -0800 |
commit | 4c333d64ca7ac516dc0d3c5830b4488e30db6d27 (patch) | |
tree | 42156407a88e70cda795bc53b4eba5553d993f20 /indra/newview | |
parent | 24cf1a475ab3f8d1a44163d0824f230ead72844e (diff) |
EXP-1832 FIX Viewer Size not persistent across logins
Save *window* width and height, not client area
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 4 | ||||
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index caeaf71484..b7e2f636d4 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -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> diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index f5a226b781..ab20ff1d42 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -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); |