Fix Issue 726

Instead of focusing the chat bar when the chat history floater is visible, focus it onFocusReceived
This avoids the floater grabbing focus when returning from mouselook.
This commit is contained in:
Lirusaito
2013-04-04 18:31:35 -04:00
parent b3c78b0ca5
commit da55a4a51c
2 changed files with 8 additions and 2 deletions

View File

@@ -179,13 +179,18 @@ void LLFloaterChat::handleVisibilityChange(BOOL new_visibility)
if (new_visibility)
{
LLFloaterChatterBox::getInstance()->setFloaterFlashing(this, FALSE);
// Work around the chat bar no longer focusing from within the layout_stack
gFocusMgr.setKeyboardFocus(getChildView("Chat Editor"));
}
LLFloater::handleVisibilityChange(new_visibility);
}
// virtual
void LLFloaterChat::onFocusReceived()
{
gFocusMgr.setKeyboardFocus(getChildView("Chat Editor")); // Work around the chat bar no longer focusing from within the layout_stack
LLFloater::onFocusReceived();
}
void LLFloaterChat::setMinimized(BOOL minimized)
{
LLFloater::setMinimized(minimized);

View File

@@ -63,6 +63,7 @@ public:
virtual void draw();
virtual BOOL postBuild();
virtual void onClose(bool app_quitting);
virtual void onFocusReceived();
virtual void handleVisibilityChange(BOOL cur_visibility);
virtual void setMinimized(BOOL);
void updateConsoleVisibility();