diff options
| author | Kitty Barnett <develop@catznip.com> | 2022-11-09 22:55:29 +0100 |
|---|---|---|
| committer | Kitty Barnett <develop@catznip.com> | 2022-11-09 23:25:02 +0100 |
| commit | 7ebaa2d2e55c6a9b7feeb684190628e340ad7920 (patch) | |
| tree | 506c00c18a41846d77f171fa4940c534cabf9060 /indra/llui/llfloater.cpp | |
| parent | 6e79ca4959d98c0305ff1c158b5402f56aba5430 (diff) | |
| parent | b5033a8859b38df045cc74e074aaee864985f145 (diff) | |
Merge branch contribution/emoji into DRTVWR-489-emoji
Diffstat (limited to 'indra/llui/llfloater.cpp')
| -rw-r--r-- | indra/llui/llfloater.cpp | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index d413fab270..763b67bb3a 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -2486,7 +2486,7 @@ void LLFloaterView::bringToFront(LLFloater* child, BOOL give_focus, BOOL restore if (mFrontChild == child) { - if (give_focus && !gFocusMgr.childHasKeyboardFocus(child)) + if (give_focus && child->canFocusStealFrontmost() && !gFocusMgr.childHasKeyboardFocus(child)) { child->setFocus(TRUE); } @@ -3039,7 +3039,34 @@ void LLFloaterView::syncFloaterTabOrder() LLFloater* floaterp = dynamic_cast<LLFloater*>(*child_it); if (gFocusMgr.childHasKeyboardFocus(floaterp)) { - bringToFront(floaterp, FALSE); + if (mFrontChild != floaterp) + { + // Grab a list of the top floaters that want to stay on top of the focused floater + std::list<LLFloater*> listTop; + if (mFrontChild && !mFrontChild->canFocusStealFrontmost()) + { + for (LLView* childp : *getChildList()) + { + LLFloater* child_floaterp = static_cast<LLFloater*>(childp); + if (child_floaterp->canFocusStealFrontmost()) + break; + listTop.push_back(child_floaterp); + } + } + + bringToFront(floaterp, FALSE); + + // Restore top floaters + if (!listTop.empty()) + { + for (LLView* childp : listTop) + { + sendChildToFront(childp); + } + mFrontChild = listTop.back(); + } + } + break; } } |
