[PATCH 2 of 2] win32: remove uneeded usage of _STARTF_USESHOWWINDOW

Adrian Buehlmann adrian at cadifra.com
Mon Jun 25 12:46:18 CDT 2012


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1340645189 -7200
# Node ID a8657233dd85dd03208b3a50cda62a046fb3951d
# Parent  3f2656c03b08bfa04519534db67ac6a0ae69d77d
win32: remove uneeded usage of _STARTF_USESHOWWINDOW

spawndetached() was the only user of _STARTF_USESHOWWINDOW and it creates the
process with _CREATE_NO_WINDOW anyway. If the process has no window, then
there is nothing to hide.

diff --git a/mercurial/win32.py b/mercurial/win32.py
--- a/mercurial/win32.py
+++ b/mercurial/win32.py
@@ -98,7 +98,6 @@
                 ('dwThreadId', _DWORD)]
 
 _CREATE_NO_WINDOW = 0x08000000
-_STARTF_USESHOWWINDOW = 0x00000001
 _SW_HIDE = 0
 
 class _COORD(ctypes.Structure):
@@ -318,8 +317,6 @@
     # which makes really detached processes impossible.
     si = _STARTUPINFO()
     si.cb = ctypes.sizeof(_STARTUPINFO)
-    si.dwFlags = _STARTF_USESHOWWINDOW
-    si.wShowWindow = _SW_HIDE
 
     pi = _PROCESS_INFORMATION()
 


More information about the Mercurial-devel mailing list