aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32-qt-io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/w32-qt-io.cpp')
-rw-r--r--src/w32-qt-io.cpp11
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. */