diff options
author | NIIBE Yutaka <[email protected]> | 2024-08-27 02:38:34 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2024-08-27 02:38:34 +0000 |
commit | b79d4206f482b323fb9f9d52a1c715e853752195 (patch) | |
tree | f4d061eddc34cbb043a454d340f98a7210cd9f7b | |
parent | w32: Allow initialization of new threads to utf8 mode. (diff) | |
download | libgpg-error-b79d4206f482b323fb9f9d52a1c715e853752195.tar.gz libgpg-error-b79d4206f482b323fb9f9d52a1c715e853752195.zip |
w32: Add GPGRT_PROCESS_ALLOW_SET_FG for gpgrt_process_spawn.
* src/gpg-error.h.in (GPGRT_PROCESS_ALLOW_SET_FG): New.
* src/spawn-w32.c (_gpgrt_process_spawn): Support the flag.
--
When GPGME will use gpgrt_process_spawn in future, this flag
will be needed to support GPGME_SPAWN_ALLOW_SET_FG.
Signed-off-by: NIIBE Yutaka <[email protected]>
-rw-r--r-- | src/gpg-error.h.in | 3 | ||||
-rw-r--r-- | src/spawn-w32.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index 5b1b9d2..68a9347 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -1098,6 +1098,9 @@ void _gpgrt_log_assert (const char *expr, const char *file, int line, /* Allow a detached process with uid != euid (Posix only). */ #define GPGRT_PROCESS_NO_EUID_CHECK (1 << 3) +/* Allow the child process to set the foreground window (Windows only). */ +#define GPGRT_PROCESS_ALLOW_SET_FG (1 << 4) + /* Specify how to keep/connect standard fds. */ #define GPGRT_PROCESS_STDIN_PIPE (1 << 8) #define GPGRT_PROCESS_STDOUT_PIPE (1 << 9) diff --git a/src/spawn-w32.c b/src/spawn-w32.c index e6ce28f..e7be33c 100644 --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -569,7 +569,6 @@ _gpgrt_process_spawn (const char *pgmname, const char *argv[], HANDLE hd_err[2]; int i; BOOL ask_inherit = FALSE; - BOOL allow_foreground_window = FALSE; struct gpgrt_spawn_actions act_default; if (!act) @@ -869,7 +868,7 @@ _gpgrt_process_spawn (const char *pgmname, const char *argv[], /* pi.hProcess, pi.hThread, */ /* (int) pi.dwProcessId, (int) pi.dwThreadId); */ - if (allow_foreground_window) + if ((flags & GPGRT_PROCESS_ALLOW_SET_FG)) { /* Fixme: For unknown reasons AllowSetForegroundWindow returns * an invalid argument error if we pass it the correct |