[FIRE-36615] Fix conversation floater becoming focused when it shouldn't be

This commit is contained in:
Hecklezz
2026-05-16 05:35:25 +10:00
parent f6d09c1e6b
commit 13334b280b
2 changed files with 9 additions and 3 deletions
+4 -1
View File
@@ -440,8 +440,11 @@ bool FSFloaterIMContainer::hasFloater(LLFloater* floaterp)
void FSFloaterIMContainer::onCloseFloater(LLUUID& id)
{
LLFloater* session_floater = mSessions[id];
bool was_session_shown = session_floater && session_floater->isShown();
mSessions.erase(id);
if (isShown())
if (was_session_shown && isShown())
{
setFocus(true);
}
+5 -2
View File
@@ -792,7 +792,10 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId)
//But I didn't find why this happen..
gFocusMgr.clearLastFocusForGroup(this);
if (mMessageList->removeItemByValue(sessionId))
LLPanel* session_panel = mMessageList->getItemByValue(sessionId);
bool was_session_shown = session_panel && session_panel->isInVisibleChain();
if (mMessageList->removeItem(session_panel))
{
mSysWellChiclet->updateWidget(isWindowEmpty());
}
@@ -811,7 +814,7 @@ void LLIMWellWindow::delIMRow(const LLUUID& sessionId)
{
setVisible(false);
}
else
else if (was_session_shown)
{
setFocus(true);
}