summaryrefslogtreecommitdiff
path: root/indra/newview/llimfloater.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-10-17 19:33:09 -0700
committerMerov Linden <merov@lindenlab.com>2012-10-17 19:33:09 -0700
commitec9260701feaa9ae1453c57f0f70449bb9b60af2 (patch)
tree9a6e74ee503c956dc8f13851f3ff0da712861b08 /indra/newview/llimfloater.cpp
parente56145176875a09dc9e1524a47bcc1259582c896 (diff)
parent49ad7fd4b57cec635c557070be02556094e90ff6 (diff)
Pull merge from richard/viewer-chui
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r--indra/newview/llimfloater.cpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp
index 467f48600a..e4032738a7 100644
--- a/indra/newview/llimfloater.cpp
+++ b/indra/newview/llimfloater.cpp
@@ -715,6 +715,19 @@ 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 +743,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,7 +755,10 @@ void LLIMFloater::setVisible(BOOL visible)
if (visible && isInVisibleChain())
{
sIMFloaterShowedSignal(mSessionID);
+
}
+
+ setFocus(visible);
}
BOOL LLIMFloater::getVisible()