mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Poems for AllowSetForegroundWindow (W32)
This commit is contained in:
parent
0819c1e8ca
commit
30a97e770c
39 changed files with 8817 additions and 8079 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-02-14 Werner Koch <wk@g10code.com>
|
||||
|
||||
* sysutils.c (gnupg_allow_set_foregound_window): New.
|
||||
(WINVER) [W32]: Define.
|
||||
|
||||
2008-01-31 Werner Koch <wk@g10code.com>
|
||||
|
||||
* audit.c (audit_print_result): Make sure that the output is
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* sysutils.c - system helpers
|
||||
* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004,
|
||||
* 2007 Free Software Foundation, Inc.
|
||||
* 2007, 2008 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of GnuPG.
|
||||
*
|
||||
|
@ -43,6 +43,7 @@
|
|||
# include <sys/resource.h>
|
||||
#endif
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
# define WINVER 0x0500 /* Required for AllowSetForegroundWindow. */
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#ifdef HAVE_PTH
|
||||
|
@ -471,3 +472,17 @@ gnupg_reopen_std (const char *pgmname)
|
|||
#endif /* HAVE_STAT && !HAVE_W32_SYSTEM */
|
||||
}
|
||||
|
||||
|
||||
/* Hack required for Windows. */
|
||||
void
|
||||
gnupg_allow_set_foregound_window (pid_t pid)
|
||||
{
|
||||
if (!pid || pid == (pid_t)(-1))
|
||||
log_info ("%s called with invalid pid %lu\n",
|
||||
"gnupg_allow_set_foregound_window", (unsigned long)pid);
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
else if (!AllowSetForegroundWindow (pid))
|
||||
log_info ("AllowSetForegroundWindow(%lu) failed: %s\n",
|
||||
(unsigned long)pid, w32_strerror (-1));
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -47,6 +47,7 @@ int translate_sys2libc_fd (gnupg_fd_t fd, int for_write);
|
|||
int translate_sys2libc_fd_int (int fd, int for_write);
|
||||
FILE *gnupg_tmpfile (void);
|
||||
void gnupg_reopen_std (const char *pgmname);
|
||||
void gnupg_allow_set_foregound_window (pid_t pid);
|
||||
|
||||
|
||||
#ifdef HAVE_W32_SYSTEM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue