diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-05-28 01:03:56 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2016-05-28 01:03:56 +0300 |
commit | 057c034cb4584fb70f63a1572be0ff2219ad6294 (patch) | |
tree | 069ecea204f81c380f484caa6aac41c29184ed3e /indra/llui | |
parent | 817ae347744eab55ee1f8084102fbc8dc5195f3a (diff) | |
parent | 0d5edb03a226a62bb416ddca250e4f1f789f56fd (diff) |
Merged in lindenlab/viewer-lynx
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llfloater.cpp | 14 | ||||
-rw-r--r-- | indra/llui/llfloater.h | 4 |
2 files changed, 12 insertions, 6 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 8a2e6a0bc0..5ea9f5b6cc 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -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); diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h index ef7c6180d2..165f67499b 100644 --- a/indra/llui/llfloater.h +++ b/indra/llui/llfloater.h @@ -310,7 +310,7 @@ public: /*virtual*/ void setVisible(BOOL visible); // do not override /*virtual*/ void onVisibilityChange ( BOOL new_visibility ); // do not override - void setFrontmost(BOOL take_focus = TRUE); + void setFrontmost(BOOL take_focus = TRUE, BOOL restore = TRUE); virtual void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); // Defaults to false. @@ -547,7 +547,7 @@ public: void setCycleMode(BOOL mode) { mFocusCycleMode = mode; } BOOL getCycleMode() const { return mFocusCycleMode; } - void bringToFront( LLFloater* child, BOOL give_focus = TRUE ); + void bringToFront( LLFloater* child, BOOL give_focus = TRUE, BOOL restore = TRUE ); void highlightFocusedFloater(); void unhighlightFocusedFloater(); void focusFrontFloater(); |