Mercurial > public > mercurial-scm > hg
comparison mercurial/win32.py @ 17051:c5ed575f3137
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.
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Mon, 25 Jun 2012 19:26:29 +0200 |
parents | e780fb37168b |
children | 72803c8edaa4 |
comparison
equal
deleted
inserted
replaced
17050:e780fb37168b | 17051:c5ed575f3137 |
---|---|
96 ('hThread', _HANDLE), | 96 ('hThread', _HANDLE), |
97 ('dwProcessId', _DWORD), | 97 ('dwProcessId', _DWORD), |
98 ('dwThreadId', _DWORD)] | 98 ('dwThreadId', _DWORD)] |
99 | 99 |
100 _CREATE_NO_WINDOW = 0x08000000 | 100 _CREATE_NO_WINDOW = 0x08000000 |
101 _STARTF_USESHOWWINDOW = 0x00000001 | |
102 _SW_HIDE = 0 | 101 _SW_HIDE = 0 |
103 | 102 |
104 class _COORD(ctypes.Structure): | 103 class _COORD(ctypes.Structure): |
105 _fields_ = [('X', ctypes.c_short), | 104 _fields_ = [('X', ctypes.c_short), |
106 ('Y', ctypes.c_short)] | 105 ('Y', ctypes.c_short)] |
316 # to handle standard streams communications. Passing these objects | 315 # to handle standard streams communications. Passing these objects |
317 # to the child process requires handle inheritance to be enabled | 316 # to the child process requires handle inheritance to be enabled |
318 # which makes really detached processes impossible. | 317 # which makes really detached processes impossible. |
319 si = _STARTUPINFO() | 318 si = _STARTUPINFO() |
320 si.cb = ctypes.sizeof(_STARTUPINFO) | 319 si.cb = ctypes.sizeof(_STARTUPINFO) |
321 si.dwFlags = _STARTF_USESHOWWINDOW | |
322 si.wShowWindow = _SW_HIDE | |
323 | 320 |
324 pi = _PROCESS_INFORMATION() | 321 pi = _PROCESS_INFORMATION() |
325 | 322 |
326 env = '' | 323 env = '' |
327 for k in os.environ: | 324 for k in os.environ: |