STORM-1879: Inventory gear menu remains on screen after floater is closed

meow-7.2.2
MartinRJ Fayray 2012-06-25 05:09:22 +02:00
parent 90547ff411
commit e35f3b7db4
2 changed files with 7 additions and 1 deletions

View File

@ -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();

View File

@ -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;
}