Skip to content

Commit 1024149

Browse files
committed
gh-118293: Suppress mouse cursor change in multiprocessing
1 parent cca953b commit 1024149

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Lib/multiprocessing/popen_spawn_win32.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import signal
44
import sys
55
import _winapi
6+
from subprocess import STARTUPINFO, STARTF_FORCEOFFFEEDBACK
67

78
from .context import reduction, get_spawning_popen, set_spawning_popen
89
from . import spawn
@@ -74,7 +75,8 @@ def __init__(self, process_obj):
7475
try:
7576
hp, ht, pid, tid = _winapi.CreateProcess(
7677
python_exe, cmd,
77-
None, None, False, 0, env, None, None)
78+
None, None, False, 0, env, None,
79+
STARTUPINFO(dwFlags=STARTF_FORCEOFFFEEDBACK))
7880
_winapi.CloseHandle(ht)
7981
except:
8082
_winapi.CloseHandle(rhandle)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
The ``multiprocessing`` module now passes the ``STARTF_FORCEOFFFEEDBACK``
2+
flag when spawning processes to tell Windows not to change the mouse cursor.

0 commit comments

Comments
 (0)