Page MenuHome GnuPG

regression: "could not grab keyboard"
Closed, ResolvedPublic

Description

$ ./gtk+-2/pinentry-gtk-2
OK Pleased to meet you
getpin

  • (pinentry-gtk-2:4063): CRITICAL **: could not grab keyboard

bisected to this commit:

commit f4b5049c68a79d5e4faba06447db5440936cefeb
Refs: [merge], <bad>
Author: Andre Heinecke <aheinecke@intevation.de>
AuthorDate: Fri Apr 15 09:51:24 2016 +0200
Commit: Andre Heinecke <aheinecke@intevation.de>
CommitDate: Fri Apr 15 10:04:42 2016 +0200

gtk2: Add a button to show/hide the passphrase.

Event Timeline

Hi, thanks for testing master.

I can semi reproduce this. For me it works the first time but a second call to
getpin fails.

$ ./pinentry-gtk-2
OK Pleased to meet you
getpin
D hello
OK
getpin

  • (pinentry-gtk-2:29090): CRITICAL **: could not grab keyboard

ERR 83886179 Operation cancelled <Pinentry>

And indeed this goes away with f4b5049c68a79d5e4faba06447db5440936cefeb~1

Looking at the code I don't see a reason for this. Maybe the dialog?
The code without the dialog 71b51e02cf20174ba7144765e985f7e889eaa429 also allows
me to repeatedly call getpin.

Werner: Any idea? I'm a bit clueless which change in the patch could have caused
that.

justus added a subscriber: justus.

This is really weird. Merely not adding the password reveal button to the hbox
'fixes' this problem. Therefore, I don't believe that the patch introduces the
bug, it merely makes it manifest itself.

I looked around in the related gtk bits, but I believe the problem might be in
the X server, or the asynchronous interaction with it. I don't believe it is
worth digging further into X.

Workaround committed in ad390f29.