Fix keyboard shortcuts like ctrl+w for floaters

This commit is contained in:
Siana Gearz
2012-01-12 01:37:13 +01:00
parent a6f36abab0
commit 4eea8624b7
5 changed files with 18 additions and 21 deletions

View File

@@ -1201,7 +1201,6 @@ BOOL LLFloater::handleMiddleMouseDown(S32 x, S32 y, MASK mask)
return LLPanel::handleMiddleMouseDown( x, y, mask );
}
// virtual
BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask)
{
@@ -1210,6 +1209,22 @@ BOOL LLFloater::handleDoubleClick(S32 x, S32 y, MASK mask)
return was_minimized || LLPanel::handleDoubleClick(x, y, mask);
}
// virtual
BOOL LLFloater::handleKeyHere(KEY key, MASK mask)
{
if (key == 'W' && mask == MASK_CONTROL)
{
if (canClose() && isCloseable())
{
close();
}
return TRUE;
}
return LLPanel::handleKeyHere(key, mask);
}
void LLFloater::bringToFront( S32 x, S32 y )
{
if (getVisible() && pointInView(x, y))