diff options
| author | Richard Linden <none@none> | 2010-02-17 17:02:26 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2010-02-17 17:02:26 -0800 |
| commit | cf52fc85ae4d06335a09b4dd60bddeb7f66841b3 (patch) | |
| tree | afa95f76e9ef3ebe9b91dce90d2a8671f28ab435 /indra/newview/llimfloater.cpp | |
| parent | 7c86d4434822d7a3172bed82c3812032089c1518 (diff) | |
| parent | 9dfff8c6d2a54e3f6e069c26cc8753dc9331aec1 (diff) | |
merge
Diffstat (limited to 'indra/newview/llimfloater.cpp')
| -rw-r--r-- | indra/newview/llimfloater.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 94b540a7e1..847695577a 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -489,11 +489,19 @@ void LLIMFloater::setVisible(BOOL visible) channel->redrawToasts(); } - if (visible && mChatHistory && mInputEditor) + BOOL is_minimized = visible && isChatMultiTab() + ? LLIMFloaterContainer::getInstance()->isMinimized() + : !visible; + + if (!is_minimized && mChatHistory && mInputEditor) { //only if floater was construced and initialized from xml updateMessages(); - mInputEditor->setFocus(TRUE); + //prevent steal focus when IM opened in multitab mode + if (!isChatMultiTab()) + { + mInputEditor->setFocus(TRUE); + } } if(!visible) @@ -514,6 +522,13 @@ BOOL LLIMFloater::getVisible() // Treat inactive floater as invisible. bool is_active = im_container->getActiveFloater() == this; + + //torn off floater is always inactive + if (!is_active && getHost() != im_container) + { + return LLTransientDockableFloater::getVisible(); + } + // getVisible() returns TRUE when Tabbed IM window is minimized. return is_active && !im_container->isMinimized() && im_container->getVisible(); } |
