summaryrefslogtreecommitdiff
path: root/indra/llui/lltoggleablemenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltoggleablemenu.cpp')
-rw-r--r--indra/llui/lltoggleablemenu.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp
index d29260750f..00d52fe10d 100644
--- a/indra/llui/lltoggleablemenu.cpp
+++ b/indra/llui/lltoggleablemenu.cpp
@@ -57,7 +57,9 @@ void LLToggleableMenu::handleVisibilityChange (BOOL curVisibilityIn)
S32 x,y;
LLUI::getMousePositionLocal(LLUI::getRootView(), &x, &y);
- if (!curVisibilityIn && mButtonRect.pointInRect(x, y))
+ // STORM-1879: also check MouseCapture to see if the button was really
+ // clicked (otherwise the VisibilityChange was triggered via keyboard shortcut)
+ if (!curVisibilityIn && mButtonRect.pointInRect(x, y) && gFocusMgr.getMouseCapture())
{
mClosedByButtonClick = true;
}
@@ -99,3 +101,8 @@ bool LLToggleableMenu::toggleVisibility()
return true;
}
+
+bool LLToggleableMenu::addChild(LLView* view, S32 tab_group)
+{
+ return addContextChild(view, tab_group);
+}