diff options
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 467f48600a..a8add9c6ab 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -715,6 +715,18 @@ void LLIMFloater::setDocked(bool docked, bool pop_on_undock) } } +void LLIMFloater::setFocus(BOOL focusFlag) +{ + LLTransientDockableFloater::setFocus(focusFlag); + + //Redirect focus to input editor + if (focusFlag) + { + updateMessages(); + mInputEditor->setFocus(TRUE); + } +} + void LLIMFloater::setVisible(BOOL visible) { LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> @@ -730,21 +742,6 @@ void LLIMFloater::setVisible(BOOL visible) channel->redrawToasts(); } - BOOL is_minimized = visible && isChatMultiTab() - ? LLIMFloaterContainer::getInstance()->isMinimized() - : !visible; - - if (!is_minimized && mChatHistory && mInputEditor) - { - //only if floater was construced and initialized from xml - updateMessages(); - //prevent stealing focus when opening a background IM tab (EXT-5387, checking focus for EXT-6781) - if (!isChatMultiTab() || hasFocus()) - { - mInputEditor->setFocus(TRUE); - } - } - if(!visible) { LLIMChiclet* chiclet = LLChicletBar::getInstance()->getChicletPanel()->findChiclet<LLIMChiclet>(mSessionID); @@ -757,6 +754,7 @@ void LLIMFloater::setVisible(BOOL visible) if (visible && isInVisibleChain()) { sIMFloaterShowedSignal(mSessionID); + setFocus(TRUE); } } |