summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorMartinRJ Fayray <fuerholz@gmx.net>2012-06-25 05:09:22 +0200
committerMartinRJ Fayray <fuerholz@gmx.net>2012-06-25 05:09:22 +0200
commite35f3b7db4803c287e95fb5aaa563e8432e71349 (patch)
tree619290ed973fd5d5bb93657db5118d05e11ffec5 /indra/llui
parent90547ff411db177bf6424ca553449a81a808fc0f (diff)
STORM-1879: Inventory gear menu remains on screen after floater is closed
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp4
-rw-r--r--indra/llui/lltoggleablemenu.cpp4
2 files changed, 7 insertions, 1 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 8ca1e685a9..90251ac7c6 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -748,6 +748,10 @@ void LLFloater::closeFloater(bool app_quitting)
dependee->setFocus(TRUE);
}
}
+
+ // STORM-1879: since this floater has focus, treat the closeFloater- call
+ // like a click on the close-button, and close gear- and contextmenus
+ LLMenuGL::sMenuContainer->hideMenus();
}
dirtyRect();
diff --git a/indra/llui/lltoggleablemenu.cpp b/indra/llui/lltoggleablemenu.cpp
index d29260750f..e4d1a37569 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;
}