зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1570845 - Call CoAllowSetForegroundWindow before ShellExecute to launch an application in the foreground. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D43536 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
4efd4ec5d2
Коммит
651b0e2a7f
|
@ -126,6 +126,12 @@ inline LauncherVoidResult ShellExecuteByExplorer(const _bstr_t& aPath,
|
|||
return LAUNCHER_ERROR_FROM_HRESULT(hr);
|
||||
}
|
||||
|
||||
// Passing the foreground privilege so that the shell can launch an
|
||||
// application in the foreground. If CoAllowSetForegroundWindow fails,
|
||||
// we continue because it's not fatal.
|
||||
hr = ::CoAllowSetForegroundWindow(shellDisp, nullptr);
|
||||
MOZ_ASSERT(SUCCEEDED(hr));
|
||||
|
||||
// shellapi.h macros interfere with the correct naming of the method being
|
||||
// called on IShellDispatch2. Temporarily remove that definition.
|
||||
#if defined(ShellExecute)
|
||||
|
|
Загрузка…
Ссылка в новой задаче