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 25, 2024
1 parent c379de2 commit 68945e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 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 All @@ -18,6 +19,7 @@
TERMINATE = 0x10000
WINEXE = (sys.platform == 'win32' and getattr(sys, 'frozen', False))
WINSERVICE = sys.executable.lower().endswith("pythonservice.exe")
STARTF_FORCEOFFFEEDBACK = 0x80


def _path_eq(p1, p2):
Expand Down Expand Up @@ -74,7 +76,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=STARTF_FORCEOFFFEEDBACK))
_winapi.CloseHandle(ht)
except:
_winapi.CloseHandle(rhandle)
Expand Down

0 comments on commit 68945e5

Please sign in to comment.