Skip to content

Commit

Permalink
pythongh-118293: Suppress mouse cursor change in multiprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
tunedal committed Apr 26, 2024
1 parent d7b9194 commit bcde233
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Lib/multiprocessing/popen_spawn_win32.py
Expand Up @@ -3,6 +3,7 @@
import signal
import sys
import _winapi
from subprocess import STARTUPINFO

from .context import reduction, get_spawning_popen, set_spawning_popen
from . import spawn
Expand Down Expand Up @@ -74,7 +75,8 @@ def __init__(self, process_obj):
try:
hp, ht, pid, tid = _winapi.CreateProcess(
python_exe, cmd,
None, None, False, 0, env, None, None)
None, None, False, 0, env, None,
STARTUPINFO(dwFlags=_winapi.STARTF_FORCEOFFFEEDBACK))
_winapi.CloseHandle(ht)
except:
_winapi.CloseHandle(rhandle)
Expand Down
@@ -0,0 +1,2 @@
The `multiprocessing` module now passes the `STARTF_FORCEOFFFEEDBACK` flag
when spawning processes to tell Windows not to change the mouse cursor.

0 comments on commit bcde233

Please sign in to comment.