On Mon, 26 Nov 2018 16:30, [email protected] said: > Thanks for the hint - I wasn't aware of that. I'll try to add this to > Enigmail.
Here is the code we use ingpgme for starting gpg. Actually we do not
start gpg directly but put a wrapper inbetween to be able to select
which handles are conveyed to gpg. That wrapper also does the
AllowSetForegroundWindow call.
--8<---------------cut here---------------start------------->8---
if (!CreateProcessA (spawnhelper,
arg_string,
&sec_attr, /* process security attributes */
&sec_attr, /* thread security attributes */
FALSE, /* inherit handles */
cr_flags, /* creation flags */
NULL, /* environment */
NULL, /* use current drive/directory */
&si, /* startup information */
&pi)) /* returns process information */
{
int lasterr = (int)GetLastError ();
TRACE_LOG ("CreateProcess failed: ec=%d", lasterr);
free (arg_string);
close (tmp_fd);
DeleteFileA (tmp_name);
free (tmp_name);
gpg_err_set_errno (EIO);
return TRACE_SYSRES (-1);
}
if (flags & IOSPAWN_FLAG_ALLOW_SET_FG)
_gpgme_allow_set_foreground_window ((pid_t)pi.dwProcessId);
--8<---------------cut here---------------end--------------->8---
We don't call AllowSetForegroundWindow directly because we partly
support older Windows versions which don't have that API. I don't think
wou will need this.
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Ausnahmen regelt ein Bundesgesetz.
pgpmbWAeJnL7i.pgp
Description: PGP signature
_______________________________________________ enigmail-users mailing list [email protected] To unsubscribe or make changes to your subscription click here: https://admin.hostpoint.ch/mailman/listinfo/enigmail-users_enigmail.net
