1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

common: Silence warnings from AllowSetForegroundWindow.

* common/sysutils.c (gnupg_allow_set_foregound_window): Print warning
only with debug flag set.
This commit is contained in:
Werner Koch 2022-08-03 11:11:22 +02:00
parent b067285d59
commit 4ef8516a79
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
2 changed files with 12 additions and 2 deletions

View file

@ -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
}