summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2020-04-21 16:57:13 +0200
committerPeter Varga <pvarga@inf.u-szeged.hu>2020-04-22 06:27:36 +0000
commitdaeb5ccdfaf9e57b7c2d737837ee6e6ea80cdd5b (patch)
treef9f963cfd1b8632e50ec987b28af1ddb8aaa6308
parent6564891efb850d344d852c1d941ed4e9c2a732c1 (diff)
downloadqtwebengine-chromium-daeb5ccdfaf9e57b7c2d737837ee6e6ea80cdd5b.tar.gz
Disable alternate window station of Windows sandbox
Initialization of Windows sandbox creates an alternate desktop. It also creates an alternate window station then assigns the browser process to it for creating the new desktop. Windows QPA has already registered for WM_CLIPBOARDUPDATE message by AddClipboardFormatListener() when sandbox initialization starts. Assigning to a new window station by SetProcessWindowStation() seems to clear the registration for the messages. Switching back to the original window station won't bring back the already registered listeners but new ones can be registered. Since, Windows QPA can't be accessed to re-register clipboard format listener, disable alternate window station when creating alternate desktop for the sandboxed renderer process. Change-Id: I236186774ebe89a138c17eae2bfb9271a18f3fd8 Fixes: QTBUG-83300 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--chromium/services/service_manager/sandbox/win/sandbox_win.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chromium/services/service_manager/sandbox/win/sandbox_win.cc b/chromium/services/service_manager/sandbox/win/sandbox_win.cc
index 0d4e7f5d5c2..bf0fedc417d 100644
--- a/chromium/services/service_manager/sandbox/win/sandbox_win.cc
+++ b/chromium/services/service_manager/sandbox/win/sandbox_win.cc
@@ -427,7 +427,12 @@ sandbox::ResultCode AddPolicyForSandboxedProcess(
return result;
policy->SetLockdownDefaultDacl();
+#ifdef TOOLKIT_QT
+ // Disable alternate window station due to QTBUG-83300
+ result = policy->SetAlternateDesktop(false);
+#else
result = policy->SetAlternateDesktop(true);
+#endif
if (result != sandbox::SBOX_ALL_OK) {
// We ignore the result of setting the alternate desktop, however log
// a launch warning.