While the "enter passphrase" dialog is opened in the foreground confirm dialogs
like the "warning insecure passphrase" is opened in the background.
To reproduce:
Start key generation in kleopatra.
Enter passphrase 123
-> Warning about insecure passphrase is opened in the background.
I've added the ShowEvent / RaiseWindow combination to the pinentryconfirm dialog
but in case of the confirm message this function fails. It succeeds in the case
of get passphrase.
I've tried calling gnupg_allow_set_foregound_window in the agent after it
launched pinentry but it appears the the agent is also the wrong place for this.
In kleopatra I can not find an AllowSetForegroundWindow call at all. GnuPG
appears to allow this in common/get-passphrase.c but I am unsure if this is used
here where we try to obtain the passphrase over the gnupg agent. And even then
why does gnupg has the SetForegroundWindow right and not the agent.
Werner can you tell me how the ForegroundWindow forwarding is supposed to work
and who should ultimately call this? I think kleopatra would be responsible here
but I can't see how Kleopatra can get at the PID of the Pinentryconfirm dialog.