diff options
author | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 19:18:15 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2010-02-26 19:18:15 -0800 |
commit | a2efe4bb4154b7ecb9c7cb279f7a28d7d401a93a (patch) | |
tree | 4cafd0e64a9c45b444664d12f022cd3e675bfebd /indra/newview/llimfloater.cpp | |
parent | 5352954eb65076d877cc74d4328620e910b93d1c (diff) | |
parent | 1ae70e112a466a6ed5baf4e05c1771218c78b2f5 (diff) |
automated merge
Diffstat (limited to 'indra/newview/llimfloater.cpp')
-rw-r--r-- | indra/newview/llimfloater.cpp | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/indra/newview/llimfloater.cpp b/indra/newview/llimfloater.cpp index 777dd350df..57ffb9ddfe 100644 --- a/indra/newview/llimfloater.cpp +++ b/indra/newview/llimfloater.cpp @@ -270,6 +270,7 @@ BOOL LLIMFloater::postBuild() mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setRevertOnEsc( FALSE ); mInputEditor->setReplaceNewlinesWithSpaces( FALSE ); + mInputEditor->setPassDelete( TRUE ); std::string session_name(LLIMModel::instance().getName(mSessionID)); @@ -406,12 +407,7 @@ LLIMFloater* LLIMFloater::show(const LLUUID& session_id) } } - if (floater_container) - { - //selecting the panel resets a chiclet's counter - floater_container->selectFloater(floater); - floater_container->setVisible(TRUE); - } + floater->openFloater(floater->getKey()); } else { @@ -492,11 +488,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,8 +518,18 @@ BOOL LLIMFloater::getVisible() if(isChatMultiTab()) { LLIMFloaterContainer* im_container = LLIMFloaterContainer::getInstance(); + + // 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 !im_container->isMinimized() && im_container->getVisible(); + return is_active && !im_container->isMinimized() && im_container->getVisible(); } else { |