From b4b6186f5438eb301001b85d2e191bffc798f541 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Tue, 8 Jan 2013 08:43:55 -0500 Subject: [PATCH] Re: 3ea353bef384772ec6b85131898b33a201c7f5e1, fix minimize case to minimize and not steal focus. Also apply to group chats. --- indra/newview/llimview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 92f5cd320..a7087cbd6 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1137,11 +1137,17 @@ LLFloaterIMPanel* LLIMMgr::createFloater( gFloaterView->addChild(floater); // reparent to floater view LLFloater* focused_floater = gFloaterView->getFocusedFloater(); // obtain the focused floater floater->open(); // make the new chat floater appear + static LLCachedControl minimize("OtherChatsTornOffAndMinimized"); if (focused_floater != NULL) // there was a focused floater { floater->setMinimized(true); // so minimize this one, for now focused_floater->setFocus(true); // and work around focus being removed by focusing on the last } + else if (minimize) + { + floater->setFocus(false); // work around focus being granted to new floater + floater->setMinimized(true); + } } mFloaters.insert(floater->getHandle()); return floater; @@ -1184,6 +1190,7 @@ LLFloaterIMPanel* LLIMMgr::createFloater( } else if (minimize) { + floater->setFocus(false); // work around focus being granted to new floater floater->setMinimized(true); } }