diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwindow/llwindow.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.cpp | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowmacosx.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowsdl.h | 2 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 9 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.h | 2 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llweb.cpp | 12 | ||||
-rw-r--r-- | indra/newview/llweb.h | 4 |
11 files changed, 29 insertions, 12 deletions
diff --git a/indra/llwindow/llwindow.h b/indra/llwindow/llwindow.h index 55b221e716..52132c38d3 100644 --- a/indra/llwindow/llwindow.h +++ b/indra/llwindow/llwindow.h @@ -160,7 +160,7 @@ public: virtual void setLanguageTextInput( const LLCoordGL & pos ) {}; virtual void updateLanguageTextInputArea() {} virtual void interruptLanguageTextInput() {} - virtual void spawnWebBrowser(const std::string& escaped_url) {}; + virtual void spawnWebBrowser(const std::string& escaped_url, bool async) {}; static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 022b97f481..7026a3f7a6 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -3178,7 +3178,7 @@ S32 OSMessageBoxMacOSX(const std::string& text, const std::string& caption, U32 // Open a URL with the user's default web browser. // Must begin with protocol identifier. -void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url) +void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async) { bool found = false; S32 i; diff --git a/indra/llwindow/llwindowmacosx.h b/indra/llwindow/llwindowmacosx.h index 7c6b324029..5ac74bb004 100644 --- a/indra/llwindow/llwindowmacosx.h +++ b/indra/llwindow/llwindowmacosx.h @@ -116,7 +116,7 @@ public: /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); /*virtual*/ void interruptLanguageTextInput(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index efa0110f8b..4d25b4134e 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -2465,7 +2465,7 @@ void exec_cmd(const std::string& cmd, const std::string& arg) // Open a URL with the user's default web browser. // Must begin with protocol identifier. -void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url) +void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async) { llinfos << "spawn_web_browser: " << escaped_url << llendl; diff --git a/indra/llwindow/llwindowsdl.h b/indra/llwindow/llwindowsdl.h index e6bdd46a77..8e65a2f324 100644 --- a/indra/llwindow/llwindowsdl.h +++ b/indra/llwindow/llwindowsdl.h @@ -125,7 +125,7 @@ public: /*virtual*/ void *getPlatformWindow(); /*virtual*/ void bringToFront(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); static std::vector<std::string> getDynamicFallbackFontList(); diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 8df9dad581..d726c60018 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2959,7 +2959,7 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t } -void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) +void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async) { bool found = false; S32 i; @@ -2989,7 +2989,12 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) // let the OS decide what to use to open the URL SHELLEXECUTEINFO sei = { sizeof( sei ) }; - sei.fMask = SEE_MASK_FLAG_DDEWAIT; + // NOTE: this assumes that SL will stick around long enough to complete the DDE message exchange + // necessary for ShellExecuteEx to complete + if (async) + { + sei.fMask = SEE_MASK_ASYNCOK; + } sei.nShow = SW_SHOWNORMAL; sei.lpVerb = L"open"; sei.lpFile = url_utf16.c_str(); diff --git a/indra/llwindow/llwindowwin32.h b/indra/llwindow/llwindowwin32.h index 9d57735772..d4a3446515 100644 --- a/indra/llwindow/llwindowwin32.h +++ b/indra/llwindow/llwindowwin32.h @@ -114,7 +114,7 @@ public: /*virtual*/ void setLanguageTextInput( const LLCoordGL & pos ); /*virtual*/ void updateLanguageTextInputArea(); /*virtual*/ void interruptLanguageTextInput(); - /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); + /*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async); LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url ); diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index a8d69a38cd..43c8c679c6 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1649,7 +1649,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); |