summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorRichard Nelson <none@none>2010-03-29 15:28:48 -0700
committerRichard Nelson <none@none>2010-03-29 15:28:48 -0700
commite50586043b3920864d58bb2243d977705d6669aa (patch)
tree6bf311b77bdce138816f9d74f071bff5e1058531 /indra/newview
parentd98b2ce4865dc90e635fe75d676e4965bccfa793 (diff)
EXT-3258 - Viewer freezes while external web browser loads page
reviewed by Callum
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llappviewer.cpp2
-rw-r--r--indra/newview/llappviewerwin32.cpp2
-rw-r--r--indra/newview/llweb.cpp12
-rw-r--r--indra/newview/llweb.h4
4 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a3d0b8d8d9..2fd840d85e 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1648,7 +1648,7 @@ bool LLAppViewer::cleanup()
// HACK: Attempt to wait until the screen res. switch is complete.
ms_sleep(1000);
- LLWeb::loadURLExternal( gLaunchFileOnQuit );
+ LLWeb::loadURLExternal( gLaunchFileOnQuit, false );
llinfos << "File launched." << llendflush;
}
diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp
index 63d9ed19ad..60a6d2f072 100644
--- a/indra/newview/llappviewerwin32.cpp
+++ b/indra/newview/llappviewerwin32.cpp
@@ -469,7 +469,7 @@ bool LLAppViewerWin32::initHardwareTest()
if (OSBTN_NO== button)
{
LL_INFOS("AppInit") << "User quitting after failed DirectX 9 detection" << LL_ENDL;
- LLWeb::loadURLExternal(DIRECTX_9_URL);
+ LLWeb::loadURLExternal(DIRECTX_9_URL, false);
return false;
}
gWarningSettings.setBOOL("AboutDirectX9", FALSE);
diff --git a/indra/newview/llweb.cpp b/indra/newview/llweb.cpp
index 3385b75c65..1a64f9d881 100644
--- a/indra/newview/llweb.cpp
+++ b/indra/newview/llweb.cpp
@@ -103,8 +103,18 @@ void LLWeb::loadURLInternal(const std::string &url)
// static
void LLWeb::loadURLExternal(const std::string& url)
{
+ loadURLExternal(url, true);
+}
+
+
+// static
+void LLWeb::loadURLExternal(const std::string& url, bool async)
+{
std::string escaped_url = escapeURL(url);
- gViewerWindow->getWindow()->spawnWebBrowser(escaped_url);
+ if (gViewerWindow)
+ {
+ gViewerWindow->getWindow()->spawnWebBrowser(escaped_url, async);
+ }
}
diff --git a/indra/newview/llweb.h b/indra/newview/llweb.h
index f4666c9280..1119b80bb4 100644
--- a/indra/newview/llweb.h
+++ b/indra/newview/llweb.h
@@ -54,8 +54,10 @@ public:
static void loadURL(const char* url) { loadURL( ll_safe_string(url) ); }
/// Load the given url in the Second Life internal web browser
static void loadURLInternal(const std::string &url);
- /// Load the given url in the operating system's web browser
+ /// Load the given url in the operating system's web browser, async if we want to return immediately
+ /// before browser has spawned
static void loadURLExternal(const std::string& url);
+ static void loadURLExternal(const std::string& url, bool async);
/// Returns escaped url (eg, " " to "%20") - used by all loadURL methods
static std::string escapeURL(const std::string& url);