From 5610e4538fab5359dc03b0c7d16ae4c6f386fefe Mon Sep 17 00:00:00 2001 From: Paul Gofman Date: Wed, 7 Dec 2022 13:20:10 -0600 Subject: [PATCH] steam_helper: Set desktop close timeout for EA Desktop. CW-Bug-Id: #21645 --- steam_helper/steam.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/steam_helper/steam.cpp b/steam_helper/steam.cpp index 1588a244..d4e74aa9 100644 --- a/steam_helper/steam.cpp +++ b/steam_helper/steam.cpp @@ -1171,6 +1171,14 @@ run: SetConsoleCtrlHandler( console_ctrl_handler, TRUE ); use_shell_execute = should_use_shell_execute(cmdline); + if (use_shell_execute && lstrlenW(cmdline) > 10 && !memcmp(cmdline, L"link2ea://", 10 *sizeof(WCHAR))) + { + HDESK desktop = GetThreadDesktop(GetCurrentThreadId()); + DWORD timeout = 300; + + if (!SetUserObjectInformationA(desktop, 1000, &timeout, sizeof(timeout))) + WINE_ERR("Failed to set desktop timeout, err %u.\n", GetLastError()); + } hide_window = env_nonzero("PROTON_HIDE_PROCESS_WINDOW"); /* only await the process finishing if we launch a process directly...