summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llbutton.cpp2
-rw-r--r--indra/llui/llfloater.cpp22
-rw-r--r--indra/llui/llfloater.h4
-rw-r--r--indra/llui/lltoolbar.cpp5
4 files changed, 26 insertions, 7 deletions
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 0a7584a576..4f0c0d31bd 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -548,7 +548,7 @@ void LLButton::setHighlight(bool b)
BOOL LLButton::handleHover(S32 x, S32 y, MASK mask)
{
if (isInEnabledChain()
- && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() != this))
+ && (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this))
mNeedsHighlight = TRUE;
if (!childrenHandleHover(x, y, mask))
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 16fe3b8ca6..1e6c8b4a71 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -1407,6 +1407,17 @@ void LLFloater::removeDependentFloater(LLFloater* floaterp)
floaterp->mDependeeHandle = LLHandle<LLFloater>();
}
+void LLFloater::setVisibleWhenMinimized(bool visible)
+{
+ mVisibleWhenMinimized = visible;
+ if (visible && isMinimized())
+ {
+ // restack in minimized stack
+ setMinimized(FALSE);
+ setMinimized(TRUE);
+ }
+}
+
BOOL LLFloater::offerClickToButton(S32 x, S32 y, MASK mask, EFloaterButton index)
{
if( mButtonsEnabled[index] )
@@ -1783,11 +1794,14 @@ void LLFloater::draw()
}
if (isMinimized())
{
- for (S32 i = 0; i < BUTTON_COUNT; i++)
+ if (mVisibleWhenMinimized)
{
- drawChild(mButtons[i]);
+ for (S32 i = 0; i < BUTTON_COUNT; i++)
+ {
+ drawChild(mButtons[i]);
+ }
+ drawChild(mDragHandle);
}
- drawChild(mDragHandle);
}
else
{
@@ -2442,7 +2456,7 @@ void LLFloaterView::getMinimizePosition(S32 *left, S32 *bottom)
{
// Examine minimized children.
LLFloater* floater = (LLFloater*)((LLView*)*child_it);
- if(floater->isMinimized())
+ if(floater->isMinimized() && floater->getVisibleWhenMinimized())
{
LLRect r = floater->getRect();
if((r.mBottom < (row + floater_header_size))
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index c94aa0207e..5e3d3aefc9 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -213,7 +213,9 @@ public:
void addDependentFloater(LLHandle<LLFloater> dependent_handle, BOOL reposition = TRUE);
LLFloater* getDependee() { return (LLFloater*)mDependeeHandle.get(); }
void removeDependentFloater(LLFloater* dependent);
- BOOL isMinimized() const { return mMinimized; }
+ BOOL isMinimized() const { return mMinimized; }
+ void setVisibleWhenMinimized(bool visible);
+ bool getVisibleWhenMinimized() const { return mVisibleWhenMinimized;}
/// isShown() differs from getVisible() in that isShown() also considers
/// isMinimized(). isShown() is true only if visible and not minimized.
bool isShown() const;
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index a1ea4ba18b..a75a1552fc 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -871,7 +871,10 @@ void LLToolBarButton::onMouseEnter(S32 x, S32 y, MASK mask)
LLUICtrl::onMouseEnter(x, y, mask);
// Always highlight toolbar buttons, even if they are disabled
- mNeedsHighlight = TRUE;
+ if (!gFocusMgr.getMouseCapture() || gFocusMgr.getMouseCapture() == this)
+ {
+ mNeedsHighlight = TRUE;
+ }
}
void LLToolBarButton::onMouseCaptureLost()