From ca31fd76df825d79e512d8ab524ef436feeaba36 Mon Sep 17 00:00:00 2001 From: Henrik Tunedal Date: Sat, 27 Apr 2024 01:16:39 +0200 Subject: [PATCH] gh-118293: Add flags for launch feedback to subprocess module --- Doc/library/subprocess.rst | 16 ++++++++++++++++ Lib/subprocess.py | 2 ++ 2 files changed, 18 insertions(+) diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst index 1cd233173e85e1..bd35fda7d79225 100644 --- a/Doc/library/subprocess.rst +++ b/Doc/library/subprocess.rst @@ -1066,6 +1066,22 @@ The :mod:`subprocess` module exposes the following constants. Specifies that the :attr:`STARTUPINFO.wShowWindow` attribute contains additional information. +.. data:: STARTF_FORCEONFEEDBACK + + A :attr:`STARTUPINFO.dwFlags` parameter to specify that the + *Working in Background* mouse cursor will be displayed while a + process is launching. This is the default behavior for GUI + processes. + + .. versionadded:: 3.13 + +.. data:: STARTF_FORCEOFFFEEDBACK + + A :attr:`STARTUPINFO.dwFlags` parameter to specify that the mouse + cursor will not be changed when launching a process. + + .. versionadded:: 3.13 + .. data:: CREATE_NEW_CONSOLE The new process has a new console, instead of inheriting its parent's diff --git a/Lib/subprocess.py b/Lib/subprocess.py index d7c7b45127104f..212fdf5b095511 100644 --- a/Lib/subprocess.py +++ b/Lib/subprocess.py @@ -83,6 +83,7 @@ STD_INPUT_HANDLE, STD_OUTPUT_HANDLE, STD_ERROR_HANDLE, SW_HIDE, STARTF_USESTDHANDLES, STARTF_USESHOWWINDOW, + STARTF_FORCEONFEEDBACK, STARTF_FORCEOFFFEEDBACK, ABOVE_NORMAL_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, HIGH_PRIORITY_CLASS, IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, REALTIME_PRIORITY_CLASS, @@ -93,6 +94,7 @@ "STD_INPUT_HANDLE", "STD_OUTPUT_HANDLE", "STD_ERROR_HANDLE", "SW_HIDE", "STARTF_USESTDHANDLES", "STARTF_USESHOWWINDOW", + "STARTF_FORCEONFEEDBACK", "STARTF_FORCEOFFFEEDBACK", "STARTUPINFO", "ABOVE_NORMAL_PRIORITY_CLASS", "BELOW_NORMAL_PRIORITY_CLASS", "HIGH_PRIORITY_CLASS", "IDLE_PRIORITY_CLASS",