summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2011-12-06 21:43:58 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2011-12-06 21:43:58 +0200
commit1c71b9030062985c307704bdf42925e0c7cb97b6 (patch)
tree51e4d4bac70951a03f40fe09b280aa869646c02c
parent2be10e866056d19f01568fe6f569af7ab9ad7686 (diff)
EXP-1651 FIXED Added saving window size after each reshape.
Fixed broken resize indicator on Linux viewer window (EXP-1580).
-rw-r--r--indra/llwindow/llwindowsdl.cpp4
-rw-r--r--indra/llwindow/llwindowsdl.h2
-rw-r--r--indra/newview/llviewerwindow.cpp5
3 files changed, 7 insertions, 4 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp
index aed035569d..6d593c807e 100644
--- a/indra/llwindow/llwindowsdl.cpp
+++ b/indra/llwindow/llwindowsdl.cpp
@@ -1034,9 +1034,9 @@ void LLWindowSDL::setMouseClipping( BOOL b )
}
// virtual
-void LLWindowSDL::setMinSize(U32 min_width, U32 min_height)
+void LLWindowSDL::setMinSize(U32 min_width, U32 min_height, bool enforce_immediately)
{
- LLWindow::setMinSize(min_width, min_height);
+ LLWindow::setMinSize(min_width, min_height, enforce_immediately);
#if LL_X11
// Set the minimum size limits for X11 window
diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h
index 76019999b1..14bc0b399d 100644
--- a/indra/llwindow/llwindowsdl.h
+++ b/indra/llwindow/llwindowsdl.h
@@ -76,7 +76,7 @@ public:
/*virtual*/ void captureMouse();
/*virtual*/ void releaseMouse();
/*virtual*/ void setMouseClipping( BOOL b );
- /*virtual*/ void setMinSize(U32 min_width, U32 min_height);
+ /*virtual*/ void setMinSize(U32 min_width, U32 min_height, bool enforce_immediately = true);
/*virtual*/ BOOL isClipboardTextAvailable();
/*virtual*/ BOOL pasteTextFromClipboard(LLWString &dst);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index eb72a8657f..31dfa1923c 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2140,7 +2140,6 @@ void LLViewerWindow::reshape(S32 width, S32 height)
sendShapeToSim();
// store new settings for the mode we are in, regardless
- // Only save size if not maximized
BOOL maximized = mWindow->getMaximized();
gSavedSettings.setBOOL("WindowMaximized", maximized);
@@ -2150,6 +2149,10 @@ void LLViewerWindow::reshape(S32 width, S32 height)
U32 min_window_height=gSavedSettings.getU32("MinWindowHeight");
// 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());
}
LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width);