diff options
| author | Kitty Barnett <develop@catznip.com> | 2022-10-23 16:35:44 +0200 |
|---|---|---|
| committer | Kitty Barnett <develop@catznip.com> | 2022-10-23 16:28:54 +0200 |
| commit | f6f52d327be5f03265d66a95df6fc0716f91ca07 (patch) | |
| tree | a8476a9b7f0bbbde2e961ecc1de1057488a93880 /indra/llui/llfloater.cpp | |
| parent | 90e272993bb4c591fd2a98772d7fe1104dbff921 (diff) | |
Provide a way for a floater to remain the topmost floater, even when focus is given to a different floater
Diffstat (limited to 'indra/llui/llfloater.cpp')
| -rw-r--r-- | indra/llui/llfloater.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0e42922543..04f6b11b7c 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -3039,7 +3039,29 @@ 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<LLView*> listTop; + if (mFrontChild && !mFrontChild->canFocusStealFrontmost()) + { + for (LLView* childfloaterp : *getChildList()) + { + if (static_cast<LLFloater*>(childfloaterp)->canFocusStealFrontmost()) + break; + listTop.push_back(childfloaterp); + } + } + + bringToFront(floaterp, FALSE); + + // Restore top floaters + for (LLView* childp :listTop) + { + sendChildToFront(childp); + } + } + break; } } |
