summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 59741a799a..76877c2dc4 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -843,7 +843,7 @@ void LLFloater::setMinimized(BOOL minimize)
LLView* viewp = *child_it;
if (!viewp->getVisible())
{
- mMinimizedHiddenChildren.push_back(viewp);
+ mMinimizedHiddenChildren.push_back(viewp->mViewHandle);
}
viewp->setVisible(FALSE);
}
@@ -906,11 +906,14 @@ void LLFloater::setMinimized(BOOL minimize)
viewp->setVisible(TRUE);
}
- std::vector<LLView*>::iterator itor = mMinimizedHiddenChildren.begin();
- while (itor != mMinimizedHiddenChildren.end())
+ std::vector<LLViewHandle>::iterator itor = mMinimizedHiddenChildren.begin();
+ for ( ; itor != mMinimizedHiddenChildren.end(); ++itor)
{
- (*itor)->setVisible(FALSE);
- ++itor;
+ LLView* viewp = LLView::getViewByHandle(*itor);
+ if(viewp)
+ {
+ viewp->setVisible(FALSE);
+ }
}
mMinimizedHiddenChildren.clear();
@@ -2275,14 +2278,22 @@ void LLFloaterView::adjustToFitScreen(LLFloater* floater, BOOL allow_partial_out
S32 min_height;
floater->getResizeLimits( &min_width, &min_height );
+ // Make sure floater isn't already smaller than its min height/width?
S32 new_width = llmax( min_width, view_width );
S32 new_height = llmax( min_height, view_height );
- if( (new_width > screen_width) || (new_height > screen_height) )
+ if( !allow_partial_outside
+ && ( (new_width > screen_width)
+ || (new_height > screen_height) ) )
{
+ // We have to force this window to be inside the screen.
new_width = llmin(new_width, screen_width);
new_height = llmin(new_height, screen_height);
+ // Still respect minimum width/height
+ new_width = llmax(new_width, min_width);
+ new_height = llmax(new_height, min_height);
+
floater->reshape( new_width, new_height, TRUE );
// Make sure the damn thing is actually onscreen.