mirror of
https://github.com/microsoft/WSL.git
synced 2026-05-05 17:36:08 -05:00
Disable the process creation cursor animation by default (#14293)
This commit is contained in:
@@ -46,8 +46,8 @@ std::wstring ReadFileContent(wil::unique_hfile& Handle)
|
||||
}
|
||||
} // namespace
|
||||
|
||||
SubProcess::SubProcess(LPCWSTR ApplicationName, LPCWSTR CommandLine, DWORD Flags) :
|
||||
m_applicationName(ApplicationName), m_commandLine(CommandLine), m_flags(Flags)
|
||||
SubProcess::SubProcess(LPCWSTR ApplicationName, LPCWSTR CommandLine, DWORD Flags, DWORD StartupFlags) :
|
||||
m_applicationName(ApplicationName), m_commandLine(CommandLine), m_flags(Flags), m_startupFlags(StartupFlags)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -159,7 +159,7 @@ wil::unique_handle SubProcess::Start()
|
||||
|
||||
STARTUPINFOEX StartupInfo{};
|
||||
StartupInfo.StartupInfo.cb = sizeof(StartupInfo);
|
||||
StartupInfo.StartupInfo.dwFlags = STARTF_USESTDHANDLES;
|
||||
StartupInfo.StartupInfo.dwFlags = STARTF_USESTDHANDLES | m_startupFlags;
|
||||
|
||||
// N.B. Passing a pseudoconsole requires all standard handles to be null
|
||||
if (m_pseudoConsole == nullptr)
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
std::wstring Stderr;
|
||||
};
|
||||
|
||||
SubProcess(LPCWSTR ApplicationName, LPCWSTR CommandLine, DWORD Flags = CREATE_UNICODE_ENVIRONMENT);
|
||||
SubProcess(LPCWSTR ApplicationName, LPCWSTR CommandLine, DWORD Flags = CREATE_UNICODE_ENVIRONMENT, DWORD StartupFlags = STARTF_FORCEOFFFEEDBACK);
|
||||
|
||||
void SetStdHandles(HANDLE Stdin, HANDLE Stdout, HANDLE Stderr);
|
||||
void SetPseudoConsole(HPCON Console);
|
||||
@@ -58,6 +58,7 @@ private:
|
||||
LPCWSTR m_desktop = nullptr;
|
||||
HANDLE m_token = nullptr;
|
||||
DWORD m_flags = 0;
|
||||
DWORD m_startupFlags = 0;
|
||||
|
||||
HANDLE m_stdIn = nullptr;
|
||||
HANDLE m_stdOut = nullptr;
|
||||
|
||||
@@ -194,7 +194,9 @@ CreateProcessResult CreateProcess(_In_ CreateProcessParsed* Parsed, _In_ HANDLE
|
||||
wsl::windows::common::helpers::SetHandleInheritable(StdOut);
|
||||
wsl::windows::common::helpers::SetHandleInheritable(StdErr);
|
||||
|
||||
wsl::windows::common::SubProcess process(Parsed->ApplicationName.c_str(), Parsed->CommandLine(), CREATE_UNICODE_ENVIRONMENT);
|
||||
// N.B. Passing StartupFlags = 0 so that the cursor feedback is set to its default behavior.
|
||||
// See: https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-startupinfoa
|
||||
wsl::windows::common::SubProcess process(Parsed->ApplicationName.c_str(), Parsed->CommandLine(), CREATE_UNICODE_ENVIRONMENT, 0);
|
||||
|
||||
CreateProcessResult Result{};
|
||||
if (Parsed->CreatePseudoconsole)
|
||||
|
||||
Reference in New Issue
Block a user