diff options
author | Werner Koch <wk@gnupg.org> | 2022-08-03 11:11:22 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2022-08-03 11:11:22 +0200 |
commit | 4ef8516a79f96c6a8898f04831d61c2655f756ef (patch) | |
tree | 244c204f56d585b64de079410e38c98c7515a531 /common | |
parent | dirmngr: Fix failed malloc error message. (diff) | |
download | gnupg2-4ef8516a79f96c6a8898f04831d61c2655f756ef.tar.xz gnupg2-4ef8516a79f96c6a8898f04831d61c2655f756ef.zip |
common: Silence warnings from AllowSetForegroundWindow.
* common/sysutils.c (gnupg_allow_set_foregound_window): Print warning
only with debug flag set.
Diffstat (limited to 'common')
-rw-r--r-- | common/sysutils.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/common/sysutils.c b/common/sysutils.c index 21b6eefb2..c30f9a0ce 100644 --- a/common/sysutils.c +++ b/common/sysutils.c @@ -778,8 +778,12 @@ gnupg_allow_set_foregound_window (pid_t pid) else if (inhibit_set_foregound_window) ; else if (!AllowSetForegroundWindow ((pid_t)pid == (pid_t)(-1)?ASFW_ANY:pid)) - log_info ("AllowSetForegroundWindow(%lu) failed: %s\n", - (unsigned long)pid, w32_strerror (-1)); + { + char *flags = getenv ("GNUPG_EXEC_DEBUG_FLAGS"); + if (flags && (atoi (flags) & 2)) + log_info ("AllowSetForegroundWindow(%lu) failed: %s\n", + (unsigned long)pid, w32_strerror (-1)); + } #endif } |