From 09db2bd9ffb0c559f848bcda7c3b6a975f5c8070 Mon Sep 17 00:00:00 2001
From: AlexanderP ProductEngine <apaschenko@productengine.com>
Date: Mon, 1 Apr 2013 19:40:40 +0300
Subject: [PATCH] CHUI-896 : ADD FIX : Line flashing and FUI button flashing
 not working correctly for CHUI notifications backed out 902caf2 and (partly)
 d498514; case "NOT_ON_TOP" was fixed

---
 indra/newview/llimview.cpp | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 141d43c6083..afac94af07c 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -182,18 +182,19 @@ void on_new_message(const LLSD& msg)
 	{
 		conversations_floater_status = CLOSED;
 	}
-	else if (!session_floater || !LLFloater::isVisible(session_floater)
-	            || session_floater->isMinimized() || !session_floater->hasFocus())
+	else if (!im_box->hasFocus() &&
+			    !(session_floater && LLFloater::isVisible(session_floater)
+	            && !session_floater->isMinimized() && session_floater->hasFocus()))
 	{
 		conversations_floater_status = NOT_ON_TOP;
 	}
-	else if ((session_floater->hasFocus()) && (im_box->getSelectedSession() == session_id))
+	else if (im_box->getSelectedSession() != session_id)
 	{
-		conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED;
+		conversations_floater_status = ON_TOP;
     }
 	else
 	{
-		conversations_floater_status = ON_TOP;
+		conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED;
 	}
 
     //  determine user prefs for this session
@@ -226,7 +227,7 @@ void on_new_message(const LLSD& msg)
     // 0. nothing - exit
     if (("none" == user_preferences ||
     		ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status)
-    	&& session_floater->isMessagePaneExpanded())
+    	    && session_floater->isMessagePaneExpanded())
     {
     	return;
     }
-- 
GitLab