From da55a4a51c72cba92408e97d113c613c923d71d8 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Thu, 4 Apr 2013 18:31:35 -0400 Subject: [PATCH] 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. --- indra/newview/llfloaterchat.cpp | 9 +++++++-- indra/newview/llfloaterchat.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/indra/newview/llfloaterchat.cpp b/indra/newview/llfloaterchat.cpp index 7e1cfcd73..60f67c1e0 100644 --- a/indra/newview/llfloaterchat.cpp +++ b/indra/newview/llfloaterchat.cpp @@ -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); diff --git a/indra/newview/llfloaterchat.h b/indra/newview/llfloaterchat.h index a3ef23fd0..e1626a9f3 100644 --- a/indra/newview/llfloaterchat.h +++ b/indra/newview/llfloaterchat.h @@ -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();