summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-05-25 08:12:47 -0700
committerGlenn Glazer <coyot@lindenlab.com>2016-05-25 08:12:47 -0700
commit67438c67aba96fe51dd29eee52bd332286dd2130 (patch)
tree5c10eacc151dfedcf0afcccd97da045169d5d704 /indra/llui/llfloater.cpp
parent9908fcf4ac43537728d1b34e30650735cfb36147 (diff)
parentfb598cd380b38714abed554b8feacabfc55b2aaa (diff)
pull from lynx
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--[-rwxr-xr-x]indra/llui/llfloater.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 14f75a2352..5ea9f5b6cc 100755..100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1326,7 +1326,7 @@ void LLFloater::setMinimized(BOOL minimize)
}
mMinimized = FALSE;
-
+ setFrontmost();
// Reshape *after* setting mMinimized
reshape( mExpandedRect.getWidth(), mExpandedRect.getHeight(), TRUE );
}
@@ -1575,6 +1575,7 @@ BOOL LLFloater::handleMouseDown(S32 x, S32 y, MASK mask)
if(offerClickToButton(x, y, mask, BUTTON_TEAR_OFF)) return TRUE;
if(offerClickToButton(x, y, mask, BUTTON_DOCK)) return TRUE;
+ setFrontmost(TRUE, FALSE);
// Otherwise pass to drag handle for movement
return mDragHandle->handleMouseDown(x, y, mask);
}
@@ -1649,7 +1650,7 @@ void LLFloater::setVisibleAndFrontmost(BOOL take_focus,const LLSD& key)
}
}
-void LLFloater::setFrontmost(BOOL take_focus)
+void LLFloater::setFrontmost(BOOL take_focus, BOOL restore)
{
LLMultiFloater* hostp = getHost();
if (hostp)
@@ -1665,7 +1666,7 @@ void LLFloater::setFrontmost(BOOL take_focus)
LLFloaterView * parent = dynamic_cast<LLFloaterView*>( getParent() );
if (parent)
{
- parent->bringToFront(this, take_focus);
+ parent->bringToFront(this, take_focus, restore);
}
// Make sure to set the appropriate transparency type (STORM-732).
@@ -2394,7 +2395,7 @@ LLRect LLFloaterView::findNeighboringPosition( LLFloater* reference_floater, LLF
}
-void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
+void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore)
{
if (!child)
return;
@@ -2478,7 +2479,12 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus)
{
sendChildToFront(child);
}
- child->setMinimized(FALSE);
+
+ if(restore)
+ {
+ child->setMinimized(FALSE);
+ }
+
if (give_focus && !gFocusMgr.childHasKeyboardFocus(child))
{
child->setFocus(TRUE);