diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llimconversation.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 5 |
2 files changed, 6 insertions, 12 deletions
diff --git a/indra/newview/llimconversation.cpp b/indra/newview/llimconversation.cpp index bd2a2419a8..f4b8d39cd0 100644 --- a/indra/newview/llimconversation.cpp +++ b/indra/newview/llimconversation.cpp @@ -202,16 +202,10 @@ void LLIMConversation::onFocusReceived() { setBackgroundOpaque(true); - if (mSessionID.notNull()) + if (mSessionID.notNull() && isInVisibleChain()) { - LLChicletBar::getInstance()->getChicletPanel()->setChicletToggleState(mSessionID, true); - - if (getVisible()) - { - // suppress corresponding toast only if this floater is visible and have focus - LLIMModel::getInstance()->setActiveSessionID(mSessionID); - LLIMModel::instance().sendNoUnreadMessages(mSessionID); - } + LLIMModel::getInstance()->setActiveSessionID(mSessionID); + LLIMModel::instance().sendNoUnreadMessages(mSessionID); } LLTransientDockableFloater::onFocusReceived(); @@ -219,6 +213,7 @@ void LLIMConversation::onFocusReceived() void LLIMConversation::onFocusLost() { + LLIMModel::getInstance()->resetActiveSessionID(); setBackgroundOpaque(false); LLTransientDockableFloater::onFocusLost(); } diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 115da54ec8..572f36ff7d 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -119,8 +119,7 @@ void toast_callback(const LLSD& msg){ } // check whether incoming IM belongs to an active session or not - if (LLIMModel::getInstance()->getActiveSessionID().notNull() - && LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) + if (LLIMModel::getInstance()->getActiveSessionID() == msg["session_id"]) { return; } @@ -147,7 +146,7 @@ void toast_callback(const LLSD& msg){ // Skip toasting if we have open window of IM with this session id LLIMFloater* open_im_floater = LLIMFloater::findInstance(msg["session_id"]); - if (open_im_floater && open_im_floater->getVisible()) + if (open_im_floater && open_im_floater->isInVisibleChain() && open_im_floater->hasFocus()) { return; } |