SL-16034 Disable all displays and UI in noninteractive mode

meow-7.2.2
Mnikolenko Productengine 2021-09-29 12:37:57 +03:00
parent 8905774631
commit 391500b5f7
3 changed files with 13 additions and 4 deletions

View File

@ -2632,9 +2632,10 @@ bool LLAppViewer::initConfiguration()
disableCrashlogger();
}
gNonInteractive = gSavedSettings.getBOOL("NonInteractive");
// Handle initialization from settings.
// Start up the debugging console before handling other options.
if (gSavedSettings.getBOOL("ShowConsoleWindow"))
if (gSavedSettings.getBOOL("ShowConsoleWindow") && !gNonInteractive)
{
initConsole();
}
@ -2755,7 +2756,6 @@ bool LLAppViewer::initConfiguration()
}
}
gNonInteractive = gSavedSettings.getBOOL("NonInteractive");
if (gNonInteractive)
{
tempSetControl("SLURLPassToOtherInstance", "FALSE");

View File

@ -124,7 +124,8 @@ void display_startup()
if ( !gViewerWindow
|| !gViewerWindow->getActive()
|| !gViewerWindow->getWindow()->getVisible()
|| gViewerWindow->getWindow()->getMinimized() )
|| gViewerWindow->getWindow()->getMinimized()
|| gNonInteractive)
{
return;
}
@ -309,7 +310,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
// Attempting to draw into a minimized window causes a GL error. JC
if ( !gViewerWindow->getActive()
|| !gViewerWindow->getWindow()->getVisible()
|| gViewerWindow->getWindow()->getMinimized() )
|| gViewerWindow->getWindow()->getMinimized()
|| gNonInteractive)
{
// Clean up memory the pools may have allocated
if (rebuild)

View File

@ -2188,6 +2188,13 @@ void LLViewerWindow::initBase()
void LLViewerWindow::initWorldUI()
{
if (gNonInteractive)
{
gIMMgr = LLIMMgr::getInstance();
gFloaterView->pushVisibleAll(FALSE);
return;
}
S32 height = mRootView->getRect().getHeight();
S32 width = mRootView->getRect().getWidth();
LLRect full_window(0, height, width, 0);