Page MenuHome GnuPG

Kleopatra: Raise window more agressively on Windows
Closed, ResolvedPublic


It has been reported and I can reproduce it, too that Kleopatra does not pop up in the foreground correctly when it does not have the AllowForegroundWindow permission. This can happen regularly. For pinentry this was a long standing issue that the passphrase dialog was in the background. We have an elegant solution for that with the logic from Pinentry with:

I hope that we can apply this somewhere centrally in Kleopatra.

This is important because it confuses especially new users who would not recognize a blinking Kleopatra icon in the task bar.

Revisions and Commits

Event Timeline

aheinecke created this task.

I am pretty sure that an AllowSetForegroundWindow in the kuniqueservice_win implementation in Kleopatra will alleviate this issue. Since we pass a double click on a file which has foreground window permissions to the existing process which at this point may not have foreground window permissions. If this still does not help we can do the minimize / maximize trick.

aheinecke changed the task status from Open to Testing.Aug 4 2021, 4:09 PM

AllowSetForegroundWindow did not work but the code from pinentry works even without the minimize / raise. The minimize raise is only required for the proper input focus and a nice animation for pinentry but the QWindowsWindowBehavior is already sufficient.