From e9ac774ceb02e166c3cccf07cbc7c28bf4f001d8 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 26 May 2022 21:25:23 +0300 Subject: SL-17473 Viewer not clearing all Vertex Buffers in some cases Image thread doesn't need mBuffer and buffer isn't thread safe so no point allocating it in an image thread. --- indra/newview/llviewerwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 24e4a02b61..bc69fd80db 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1998,7 +1998,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) } LLVertexBuffer::initClass(gSavedSettings.getBOOL("RenderVBOEnable"), gSavedSettings.getBOOL("RenderVBOMappingDisable")); LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ; - gGL.init() ; + gGL.init(true); if (LLFeatureManager::getInstance()->isSafe() || (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion()) -- cgit v1.2.3 From 1de8306c830611d22e9d684ad1372e6f506f21af Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 11 Aug 2022 23:03:14 +0300 Subject: SL-17965 Closing some floaters shifts focus to menu bar Focus root now only covers menu, status and nav bar to not steal focus from floaters This partially reverts commit 1d6bfb727a8015e82cd4060a0c73cf3fc719e818. --- indra/newview/llviewerwindow.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cf243f085f..ebbc9c0681 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2224,26 +2224,31 @@ void LLViewerWindow::initWorldUI() // Force gFloaterTools to initialize LLFloaterReg::getInstance("build"); - // Status bar LLPanel* status_bar_container = getRootView()->getChild("status_bar_container"); gStatusBar = new LLStatusBar(status_bar_container->getLocalRect()); - gStatusBar->setFollowsAll(); + gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT); gStatusBar->setShape(status_bar_container->getLocalRect()); // sync bg color with menu bar gStatusBar->setBackgroundColor( gMenuBarView->getBackgroundColor().get() ); // add InBack so that gStatusBar won't be drawn over menu - status_bar_container->addChildInBack(gStatusBar); - status_bar_container->setVisible(TRUE); + status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/); + status_bar_container->setVisible(TRUE); // Navigation bar - LLPanel* nav_bar_container = getRootView()->getChild("nav_bar_container"); + LLView* nav_bar_container = getRootView()->getChild("nav_bar_container"); LLNavigationBar* navbar = LLNavigationBar::getInstance(); navbar->setShape(nav_bar_container->getLocalRect()); navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get()); nav_bar_container->addChild(navbar); nav_bar_container->setVisible(TRUE); + + // Navigation bar is outside visible area, expand status_bar_container to show it + S32 new_height = nav_bar_container->getRect().getHeight() + status_bar_container->getRect().getHeight(); + S32 new_width = status_bar_container->getRect().getWidth(); + status_bar_container->reshape(new_width, new_height, TRUE); + if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { -- cgit v1.2.3 From ee3fe6f66a008c583d02c3d63dd39fcd527a65f4 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 12 Aug 2022 17:08:09 +0300 Subject: SL-17964 FIXED Pressing M while any floater has focus switches into mouselook --- indra/newview/llviewerwindow.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ebbc9c0681..ae9da97642 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -262,6 +262,8 @@ static const F32 MIN_UI_SCALE = 0.75f; static const F32 MAX_UI_SCALE = 7.0f; static const F32 MIN_DISPLAY_SCALE = 0.75f; +static const char KEY_MOUSELOOK = 'M'; + static LLCachedControl sSnapshotBaseName(LLCachedControl(gSavedPerAccountSettings, "SnapshotBaseName", "Snapshot")); static LLCachedControl sSnapshotDir(LLCachedControl(gSavedPerAccountSettings, "SnapshotBaseDir", "")); @@ -2879,6 +2881,13 @@ BOOL LLViewerWindow::handleKey(KEY key, MASK mask) if (keyboard_focus && !gFocusMgr.getKeystrokesOnly()) { + //Most things should fall through, but mouselook is an exception, + //don't switch to mouselook if any floater has focus + if ((key == KEY_MOUSELOOK) && !(mask & (MASK_CONTROL | MASK_ALT))) + { + return TRUE; + } + LLUICtrl* cur_focus = dynamic_cast(keyboard_focus); if (cur_focus && cur_focus->acceptsTextInput()) { -- cgit v1.2.3 From e9da22cecc526087b62c39c5d0824ec918b874bc Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Fri, 9 Sep 2022 18:53:23 +0300 Subject: SL-18110 Reshape status bar container when hiding navigation panel --- indra/newview/llviewerwindow.cpp | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index ae9da97642..76ef71971c 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2246,16 +2246,16 @@ void LLViewerWindow::initWorldUI() nav_bar_container->addChild(navbar); nav_bar_container->setVisible(TRUE); - // Navigation bar is outside visible area, expand status_bar_container to show it - S32 new_height = nav_bar_container->getRect().getHeight() + status_bar_container->getRect().getHeight(); - S32 new_width = status_bar_container->getRect().getWidth(); - status_bar_container->reshape(new_width, new_height, TRUE); - if (!gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) { navbar->setVisible(FALSE); } + else + { + reshapeStatusBarContainer(); + } + // Top Info bar LLPanel* topinfo_bar_container = getRootView()->getChild("topinfo_bar_container"); @@ -5847,6 +5847,27 @@ LLRect LLViewerWindow::getChatConsoleRect() return console_rect; } + +void LLViewerWindow::reshapeStatusBarContainer() +{ + LLPanel* status_bar_container = getRootView()->getChild("status_bar_container"); + LLView* nav_bar_container = getRootView()->getChild("nav_bar_container"); + + S32 new_height = status_bar_container->getRect().getHeight(); + S32 new_width = status_bar_container->getRect().getWidth(); + + if (gSavedSettings.getBOOL("ShowNavbarNavigationPanel")) + { + // Navigation bar is outside visible area, expand status_bar_container to show it + new_height += nav_bar_container->getRect().getHeight(); + } + else + { + // collapse status_bar_container + new_height -= nav_bar_container->getRect().getHeight(); + } + status_bar_container->reshape(new_width, new_height, TRUE); +} //---------------------------------------------------------------------------- -- cgit v1.2.3 From 1fb1a9df7a6664946f1f758330a0e6cfaef0dd8f Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 19 Oct 2022 16:17:26 -0400 Subject: Fix leak of context menu branches Introduce menu bloat logging code --- indra/newview/llviewerwindow.cpp | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 5ce46b143a..49f5756976 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -3420,6 +3420,59 @@ void LLViewerWindow::updateUI() root_view = mRootView; } + static LLCachedControl dump_menu_holder(gSavedSettings, "DumpMenuHolderSize", false); + if (dump_menu_holder) + { + static bool init = false; + static LLFrameTimer child_count_timer; + static std::vector child_vec; + if (!init) + { + child_count_timer.resetWithExpiry(5.f); + init = true; + } + if (child_count_timer.hasExpired()) + { + LL_INFOS() << "gMenuHolder child count: " << gMenuHolder->getChildCount() << LL_ENDL; + std::vector local_child_vec; + LLView::child_list_t child_list = *gMenuHolder->getChildList(); + for (auto child : child_list) + { + local_child_vec.emplace_back(child->getName()); + } + if (!local_child_vec.empty() && local_child_vec != child_vec) + { + std::vector out_vec; + std::sort(local_child_vec.begin(), local_child_vec.end()); + std::sort(child_vec.begin(), child_vec.end()); + std::set_difference(child_vec.begin(), child_vec.end(), local_child_vec.begin(), local_child_vec.end(), std::inserter(out_vec, out_vec.begin())); + if (!out_vec.empty()) + { + LL_INFOS() << "gMenuHolder removal diff size: '"< Date: Thu, 27 Oct 2022 23:08:09 +0300 Subject: DRTVWR-570 Mac build fix: unused variables cleanup --- indra/newview/llviewerwindow.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 588fb4eb1b..f4d8eb6035 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1307,7 +1307,6 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi TRUE /* pick_transparent */, FALSE /* pick_rigged */); - LLUUID object_id = pick_info.getObjectID(); S32 object_face = pick_info.mObjectFace; std::string url = data; -- cgit v1.2.3