From d53041d9ea1687febf2d9e7c38ac5d4be3c8eae0 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 15 May 2026 19:11:26 +0300 Subject: #5804 Prevent focus steal when removing unselected conversation widget --- indra/newview/llfloaterimcontainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index a0f2dbe197..e80133f93c 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1948,7 +1948,7 @@ bool LLFloaterIMContainer::removeConversationListItem(const LLUUID& uuid, bool c mConversationEventQueue.erase(uuid); // Don't let the focus fall IW, select and refocus on the first conversation in the list - if (change_focus && isInVisibleChain()) + if (change_focus && is_widget_selected && isInVisibleChain()) { setFocus(true); if (new_selection) -- cgit v1.3 From 92154ed36ffddac349ac2336a3cc5a1eb6eebb72 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Thu, 23 Jul 2026 16:27:19 +0300 Subject: #5804 Select opened adhoc chat --- indra/newview/llfloaterimcontainer.cpp | 6 +++--- indra/newview/llfloaterimcontainer.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index ef4252eba6..f4a22c6728 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -1726,7 +1726,7 @@ bool LLFloaterIMContainer::visibleContextMenuItem(const LLSD& userdata) void LLFloaterIMContainer::showConversation(const LLUUID& session_id) { setVisibleAndFrontmost(false); - selectConversationPair(session_id, true); + selectConversationPair(session_id, true, true, true); LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); if (session_floater) @@ -1772,13 +1772,13 @@ void LLFloaterIMContainer::selectNextConversationByID(const LLUUID& uuid) } // Synchronous select the conversation item and the conversation floater -bool LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/) +bool LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater/*=true*/, bool force_select_widget/*=false*/) { bool handled = true; LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(session_id); /* widget processing */ - if (select_widget && mConversationsRoot->getSelectedCount() <= 1) + if (select_widget && (force_select_widget || mConversationsRoot->getSelectedCount() <= 1)) { LLFolderViewItem* widget = get_ptr_in_map(mConversationsWidgets,session_id); if (widget && widget->getParentFolder()) diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 9f1690a9b9..4cb243aa64 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -74,7 +74,7 @@ public: void showConversation(const LLUUID& session_id); void selectConversation(const LLUUID& session_id); void selectNextConversationByID(const LLUUID& session_id); - bool selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true); + bool selectConversationPair(const LLUUID& session_id, bool select_widget, bool focus_floater = true, bool force_select_widget = false); void clearAllFlashStates(); bool selectAdjacentConversation(bool focus_selected); bool selectNextorPreviousConversation(bool select_next, bool focus_selected = true); -- cgit v1.3 From a8b866c34850469463313afbf4411339bb3c8749 Mon Sep 17 00:00:00 2001 From: Andrey Lihatskiy Date: Fri, 31 Jul 2026 19:04:00 +0300 Subject: #6070 Highlight ad-hoc conversation on creating --- indra/newview/llfloaterimcontainer.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llfloaterimcontainer.cpp') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f4a22c6728..0da56a12a9 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -155,6 +155,11 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const { // The general strategy when a session id is modified is to delete all related objects and create them anew. + // The conversation floater can be active while participant widgets are selected. + // Preserve that state separately so the new conversation widget can be selected + // after the server replaces an outgoing ad-hoc session id. + const bool was_active = old_session_id == getSelectedSession(); + // Note however that the LLFloaterIMSession has its session id updated through a call to sessionInitReplyReceived() // and do not need to be deleted and recreated (trying this creates loads of problems). We do need however to suppress // its related mSessions record as it's indexed with the wrong id. @@ -167,6 +172,11 @@ void LLFloaterIMContainer::sessionIDUpdated(const LLUUID& old_session_id, const // Create a new conversation with the new id addConversationListItem(new_session_id, change_focus); LLFloaterIMSessionTab::addToHost(new_session_id); + + if (was_active) + { + selectConversationPair(new_session_id, true, false, true); + } } -- cgit v1.3