diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-07-02 09:57:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-11-16 19:34:49 -0800 |
commit | e6ea9f7f870c346a6f04c0b5d7ec49e5f2156164 (patch) | |
tree | 097ebe3e7c5aff7c44b9b280ce045a160a16d0c4 /config | |
parent | a143efde405d1a093201b7ba7cfa6d5b8140836c (diff) | |
download | cygnal-e6ea9f7f870c346a6f04c0b5d7ec49e5f2156164.tar.gz cygnal-e6ea9f7f870c346a6f04c0b5d7ec49e5f2156164.tar.bz2 cygnal-e6ea9f7f870c346a6f04c0b5d7ec49e5f2156164.zip |
Fix spawned process window not foregrounding.
This patch addresses an issue whereby the window of
a process created with CreateProcess fails to come
to the foreground.
This occurs when the calling process itself hasn't run any
Windows event processing loop. A repro test case is to make a
program with a main, and and call CreateProcess to spawn
calc.exe or notepad.exe before doing anything else.
It turns out that a dummy call to TranslateMessage makes this
issue goes away. If such a call is made before CreateProcess,
then the spawned process' window comes up in the foreground
as expected.
* winsup/cygwin/Makefile.in (DLL_IMPORTS): We need to link
in user32.dll to call TranslateMessage. Condense the
multiple ${shell ...} call repetition with a foreach.
* winsup/cygwin/spawn.cc (child_info_spawn::worker): Do the
dummy TranslateMessage call before the section of code that
calls CreateProcess or CreateProcessAsUser.
Diffstat (limited to 'config')
0 files changed, 0 insertions, 0 deletions