diff options
| author | Werner Koch <[email protected]> | 2009-06-12 16:58:45 +0000 | 
|---|---|---|
| committer | Werner Koch <[email protected]> | 2009-06-12 16:58:45 +0000 | 
| commit | 148f51bb3e6e592333250ef73f2b801a10734083 (patch) | |
| tree | 08ea4fe8f7b9009372821e9b28e41df294b248d8 /src/w32-qt-io.cpp | |
| parent | Fix possible assert in the card edit. (diff) | |
| download | gpgme-148f51bb3e6e592333250ef73f2b801a10734083.tar.gz gpgme-148f51bb3e6e592333250ef73f2b801a10734083.zip  | |
Improved W32 SetForegroundWindow hacks.
Diffstat (limited to 'src/w32-qt-io.cpp')
| -rw-r--r-- | src/w32-qt-io.cpp | 11 | 
1 files changed, 8 insertions, 3 deletions
diff --git a/src/w32-qt-io.cpp b/src/w32-qt-io.cpp index 08f780f1..03e9ea83 100644 --- a/src/w32-qt-io.cpp +++ b/src/w32-qt-io.cpp @@ -397,7 +397,7 @@ build_commandline (char **argv)  int -_gpgme_io_spawn (const char *path, char * const argv[], +_gpgme_io_spawn (const char *path, char * const argv[], unsigned int flags,  		 struct spawn_fd_item_s *fd_list, pid_t *r_pid)  {    SECURITY_ATTRIBUTES sec_attr; @@ -492,6 +492,9 @@ _gpgme_io_spawn (const char *path, char * const argv[],    free (arg_string); +  if (flags & IOSPAWN_FLAG_ALLOW_SET_FG) +    _gpgme_allow_set_foreground_window ((pid_t)pi.dwProcessId); +    /* Insert the inherited handles.  */    for (i = 0; fd_list[i].fd != -1; i++)      { @@ -533,8 +536,10 @@ _gpgme_io_spawn (const char *path, char * const argv[],      int written;      size_t len; -    line[0] = '\n'; -    line[1] = '\0'; +    if ((flags & IOSPAWN_FLAG_ALLOW_SET_FG)) +      strcpy (line, "~1 \n"); +    else +      strcpy (line, "\n");      for (i = 0; fd_list[i].fd != -1; i++)        {  	/* Strip the newline.  */  | 
