Beispiel #1
0
BOOL LLMultiFloater::handleKeyHere(KEY key, MASK mask)
{
	if (key == 'W' && mask == MASK_CONTROL)
	{
		LLFloater* floater = getActiveFloater();
		// is user closeable and is system closeable
		if (floater && floater->canClose() && floater->isCloseable())
		{
			floater->closeFloater();

			// EXT-5695 (Tabbed IM window loses focus if close any tabs by Ctrl+W)
			// bring back focus on tab container if there are any tab left
			if(mTabContainer->getTabCount() > 0)
			{
				mTabContainer->setFocus(TRUE);
			}
		}
		return TRUE;
	}

	return LLFloater::handleKeyHere(key, mask);
}
BOOL LLFloaterChatterBox::handleKeyHere(KEY key, MASK mask)
{
	if (key == 'W' && mask == MASK_CONTROL)
	{
		LLFloater* floater = getActiveFloater();
		// is user closeable and is system closeable
		if (floater && floater->canClose())
		{
			if (floater->isCloseable())
			{
				floater->close();
			}
			else
			{
				// close chatterbox window if frontmost tab is reserved, non-closeable tab
				// such as contacts or near me
				close();
			}
		}
		return TRUE;
	}

	return LLMultiFloater::handleKeyHere(key, mask);
}