From 774405e92bec6bdfa9e2be28e04b4b47fd71615e Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 18 Feb 2011 23:16:38 +0000 Subject: Cleanup of headless client (was: DisableRendering mode) * Now called 'HeadlessClient' instead of 'DisableRendering' * Removed most cases where we skipped certain behaviors in the client when in this mode. This gets us closer to a 'true' client, for testing purposes. --- indra/newview/llviewerwindow.cpp | 56 ++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 37 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 166b110412..435da72622 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1225,8 +1225,9 @@ void LLViewerWindow::handleMenuSelect(LLWindow *window, S32 menu_item) BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S32 height) { + // *TODO: Enable similar information output for other platforms? DK 2011-02-18 #if LL_WINDOWS - if (gNoRender) + if (gHeadlessClient) { HWND window_handle = (HWND)window->getPlatformWindow(); PAINTSTRUCT ps; @@ -1256,7 +1257,7 @@ BOOL LLViewerWindow::handlePaint(LLWindow *window, S32 x, S32 y, S32 width, S len = temp_str.length(); TextOutA(hdc, 0, 25, temp_str.c_str(), len); - TextOutA(hdc, 0, 50, "Set \"DisableRendering FALSE\" in settings.ini file to reenable", 61); + TextOutA(hdc, 0, 50, "Set \"HeadlessClient FALSE\" in settings.ini file to reenable", 61); EndPaint(window_handle, &ps); return TRUE; } @@ -1404,9 +1405,9 @@ LLViewerWindow::LLViewerWindow( mWindow = LLWindowManager::createWindow(this, title, name, x, y, width, height, 0, fullscreen, - gNoRender, + gHeadlessClient, gSavedSettings.getBOOL("DisableVerticalSync"), - !gNoRender, + !gHeadlessClient, ignore_pixel_depth, gSavedSettings.getBOOL("RenderUseFBO") ? 0 : gSavedSettings.getU32("RenderFSAASamples")); //don't use window level anti-aliasing if FBOs are enabled @@ -1862,11 +1863,8 @@ void LLViewerWindow::shutdownGL() LLVertexBuffer::cleanupClass(); llinfos << "Stopping GL during shutdown" << llendl; - if (!gNoRender) - { - stopGL(FALSE); - stop_glerror(); - } + stopGL(FALSE); + stop_glerror(); gGL.shutdown(); } @@ -1930,11 +1928,6 @@ void LLViewerWindow::reshape(S32 width, S32 height) // may have been destructed. if (!LLApp::isExiting()) { - if (gNoRender) - { - return; - } - gWindowResized = TRUE; // update our window rectangle @@ -2575,11 +2568,12 @@ void LLViewerWindow::updateUI() S32 x = mCurrentMousePoint.mX; S32 y = mCurrentMousePoint.mY; - MASK mask = gKeyboard->currentMask(TRUE); - if (gNoRender) + MASK mask = MASK_NONE; + // *TODO: Create a headless gKeyboard DK 2011-02-18 + if (gKeyboard) { - return; + mask = gKeyboard->currentMask(TRUE); } if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) @@ -3410,11 +3404,6 @@ BOOL LLViewerWindow::clickPointOnSurfaceGlobal(const S32 x, const S32 y, LLViewe void LLViewerWindow::pickAsync(S32 x, S32 y_from_bot, MASK mask, void (*callback)(const LLPickInfo& info), BOOL pick_transparent) { - if (gNoRender) - { - return; - } - BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) { @@ -3450,11 +3439,6 @@ void LLViewerWindow::schedulePick(LLPickInfo& pick_info) void LLViewerWindow::performPick() { - if (gNoRender) - { - return; - } - if (!mPicks.empty()) { std::vector::iterator pick_it; @@ -3486,11 +3470,6 @@ void LLViewerWindow::returnEmptyPicks() // Performs the GL object/land pick. LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_transparent) { - if (gNoRender) - { - return LLPickInfo(); - } - BOOL in_build_mode = LLFloaterReg::instanceVisible("build"); if (in_build_mode || LLDrawPoolAlpha::sShowDebugAlpha) { @@ -3500,7 +3479,13 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans } // shortcut queueing in mPicks and just update mLastPick in place - mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), gKeyboard->currentMask(TRUE), pick_transparent, TRUE, NULL); + MASK key_mask = MASK_NONE; + // *TODO: Create a headless gKeyboard DK 2011-02-18 + if (gKeyboard) + { + key_mask = gKeyboard->currentMask(TRUE); + } + mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, TRUE, NULL); mLastPick.fetchResults(); return mLastPick; @@ -4774,12 +4759,9 @@ bool LLViewerWindow::onAlert(const LLSD& notify) { LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); - if (gNoRender) + if (gHeadlessClient) { llinfos << "Alert: " << notification->getName() << llendl; - notification->respond(LLSD::emptyMap()); - LLNotifications::instance().cancel(notification); - return false; } // If we're in mouselook, the mouse is hidden and so the user can't click -- cgit v1.2.3 From b5e843abb59ac32cb8cd85dc4b1a43f2bb5c22ee Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Sat, 19 Feb 2011 02:21:51 +0000 Subject: Fix for more instances of dereferencing gKeyboard in headless client. --- indra/newview/llviewerwindow.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 336915ac8c..2d6fabf611 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2973,7 +2973,13 @@ void LLViewerWindow::updateLayout() } // Update the location of the blue box tool popup LLCoordGL select_center_screen; - gFloaterTools->updatePopup( select_center_screen, gKeyboard->currentMask(TRUE) ); + MASK mask = MASK_NONE; + // *TODO: Create a headless gKeyboard DK 2011-02-18 + if (gKeyboard) + { + mask = gKeyboard->currentMask(TRUE); + } + gFloaterTools->updatePopup( select_center_screen, mask ); } else { @@ -3099,7 +3105,13 @@ void LLViewerWindow::updateKeyboardFocus() // sync all floaters with their focus state gFloaterView->highlightFocusedFloater(); gSnapshotFloaterView->highlightFocusedFloater(); - if ((gKeyboard->currentMask(TRUE) & MASK_CONTROL) == 0) + MASK mask = MASK_NONE; + // *TODO: Create a headless gKeyboard DK 2011-02-18 + if (gKeyboard) + { + mask = gKeyboard->currentMask(TRUE); + } + if ((mask & MASK_CONTROL) == 0) { // control key no longer held down, finish cycle mode gFloaterView->setCycleMode(FALSE); -- cgit v1.2.3 From 0929315ab103433275a71f26a4900ee0615932e9 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Wed, 23 Feb 2011 05:40:08 +0000 Subject: Added headless client keyboard --- indra/newview/llviewerwindow.cpp | 28 ++++------------------------ 1 file changed, 4 insertions(+), 24 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 21e3626bf8..a5218786d8 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2577,12 +2577,7 @@ void LLViewerWindow::updateUI() S32 x = mCurrentMousePoint.mX; S32 y = mCurrentMousePoint.mY; - MASK mask = MASK_NONE; - // *TODO: Create a headless gKeyboard DK 2011-02-18 - if (gKeyboard) - { - mask = gKeyboard->currentMask(TRUE); - } + MASK mask = gKeyboard->currentMask(TRUE); if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_RAYCAST)) { @@ -2973,12 +2968,7 @@ void LLViewerWindow::updateLayout() } // Update the location of the blue box tool popup LLCoordGL select_center_screen; - MASK mask = MASK_NONE; - // *TODO: Create a headless gKeyboard DK 2011-02-18 - if (gKeyboard) - { - mask = gKeyboard->currentMask(TRUE); - } + MASK mask = gKeyboard->currentMask(TRUE); gFloaterTools->updatePopup( select_center_screen, mask ); } else @@ -3105,12 +3095,7 @@ void LLViewerWindow::updateKeyboardFocus() // sync all floaters with their focus state gFloaterView->highlightFocusedFloater(); gSnapshotFloaterView->highlightFocusedFloater(); - MASK mask = MASK_NONE; - // *TODO: Create a headless gKeyboard DK 2011-02-18 - if (gKeyboard) - { - mask = gKeyboard->currentMask(TRUE); - } + MASK mask = gKeyboard->currentMask(TRUE); if ((mask & MASK_CONTROL) == 0) { // control key no longer held down, finish cycle mode @@ -3499,12 +3484,7 @@ LLPickInfo LLViewerWindow::pickImmediate(S32 x, S32 y_from_bot, BOOL pick_trans } // shortcut queueing in mPicks and just update mLastPick in place - MASK key_mask = MASK_NONE; - // *TODO: Create a headless gKeyboard DK 2011-02-18 - if (gKeyboard) - { - key_mask = gKeyboard->currentMask(TRUE); - } + MASK key_mask = gKeyboard->currentMask(TRUE); mLastPick = LLPickInfo(LLCoordGL(x, y_from_bot), key_mask, pick_transparent, TRUE, NULL); mLastPick.fetchResults(); -- cgit v1.2.3 From 22be29e60f5f45c7d30add3aeb219fef34d4ffec Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 18 Mar 2011 17:08:03 -0700 Subject: SOCIAL-762 FIX cannot change to advanced mode need separate flags for first run and first login --- indra/newview/llviewerwindow.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 0778536d15..6bf363bf68 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1799,12 +1799,11 @@ void LLViewerWindow::initWorldUI() avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); } - if (gSavedSettings.getBOOL("FirstRunThisInstall")) + if (gSavedSettings.getBOOL("FirstLoginThisInstall")) { toggle_destination_and_avatar_picker(0); + gSavedSettings.setBOOL("FirstLoginThisInstall", FALSE); } - - gSavedSettings.setBOOL("FirstRunThisInstall", FALSE); } // Destroy the UI -- cgit v1.2.3 From a57729b9260ce5e711bff47c02ca54ab65eade27 Mon Sep 17 00:00:00 2001 From: callum Date: Tue, 22 Mar 2011 13:58:27 -0700 Subject: SOCIAL-634 FIX Error condition content for Destination Guide, Avatar Picker, and Help if S3 content or web content is not available --- indra/newview/llviewerwindow.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 6bf363bf68..b71eebc30f 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1791,11 +1791,13 @@ void LLViewerWindow::initWorldUI() LLMediaCtrl* avatar_picker = avatar_picker_destination_guide_container->findChild("avatar_picker_contents"); if (destinations) { + destinations->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); destinations->navigateTo(gSavedSettings.getString("DestinationGuideURL"), "text/html"); } if (avatar_picker) { + avatar_picker->setErrorPageURL(gSavedSettings.getString("GenericErrorPageURL")); avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); } -- cgit v1.2.3 From 9c82ea334ab0c1283f28997fe060b24200e3e2be Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Wed, 23 Mar 2011 17:02:23 -0700 Subject: SOCIAL-714 FIX [PUBLIC] Basic mode to launch with Destinations panel open by default --- indra/newview/llviewerwindow.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index b71eebc30f..faf4e8b3fc 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1801,11 +1801,8 @@ void LLViewerWindow::initWorldUI() avatar_picker->navigateTo(gSavedSettings.getString("AvatarPickerURL"), "text/html"); } - if (gSavedSettings.getBOOL("FirstLoginThisInstall")) - { - toggle_destination_and_avatar_picker(0); - gSavedSettings.setBOOL("FirstLoginThisInstall", FALSE); - } + // show destinations by default + toggle_destination_and_avatar_picker(gSavedSettings.getS32("DestinationsAndAvatarsVisibility")); } // Destroy the UI -- cgit v1.2.3 From b286a9091b66c816f12e9a98e5ae092549261904 Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 25 Mar 2011 13:56:14 -0700 Subject: SOCIAL-688 FIX Multiple SLurls error given in minimal skin when clicking links in web profile Also fixes SOCIAL-521 and SOCIAL-428 --- indra/newview/llviewerwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 014d64176a..cd19d0c5cd 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -915,7 +915,7 @@ LLWindowCallbacks::DragNDropResult LLViewerWindow::handleDragNDrop( LLWindow *wi { if (drop) { - LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), NULL, true ); + LLURLDispatcher::dispatch( dropped_slurl.getSLURLString(), "clicked", NULL, true ); return LLWindowCallbacks::DND_MOVE; } return LLWindowCallbacks::DND_COPY; @@ -1306,7 +1306,7 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) std::string url = (const char*)data; LLMediaCtrl* web = NULL; const bool trusted_browser = false; - if (LLURLDispatcher::dispatch(url, web, trusted_browser)) + if (LLURLDispatcher::dispatch(url, "clicked", web, trusted_browser)) { // bring window to foreground, as it has just been "launched" from a URL mWindow->bringToFront(); -- cgit v1.2.3 From bdef5609828a06b50ceadf61f56ac2d31e9b7f43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 7 Apr 2011 16:20:26 -0700 Subject: SOCIAL-688 FIX Multiple SLurls error given in minimal skin when clicking links in web profile reverted throttling of untrusted slapps to 1 every 5 seconds don't treat slapps originating from external browsers as clicks and thus bypassing throttling --- indra/newview/llviewerwindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewerwindow.cpp') diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 8ce15c7dfc..4305349ea2 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1317,7 +1317,8 @@ void LLViewerWindow::handleDataCopy(LLWindow *window, S32 data_type, void *data) std::string url = (const char*)data; LLMediaCtrl* web = NULL; const bool trusted_browser = false; - if (LLURLDispatcher::dispatch(url, "clicked", web, trusted_browser)) + // don't treat slapps coming from external browsers as "clicks" as this would bypass throttling + if (LLURLDispatcher::dispatch(url, "", web, trusted_browser)) { // bring window to foreground, as it has just been "launched" from a URL mWindow->bringToFront(); -- cgit v1.2.3