Summary: | app-crypt/pinentry-0.7.2 - gtk2 fails with "** ERROR **: could not grab keyboard" | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Maurice van der Pot (RETIRED) <griffon26> |
Component: | Current packages | Assignee: | Crypto team [DISABLED] <crypto+disabled> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gnome |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
URL: | https://bugs.g10code.com/gnupg/issue798 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 159851 | ||
Attachments: |
pinentry-0.7.2-debug.patch
pinentry-0.7.2-debug.patch fix |
Description
Maurice van der Pot (RETIRED)
![]() Created attachment 109261 [details, diff]
pinentry-0.7.2-debug.patch
Hmmm.... It seems that gdk_keyboard_grab is failing in pinentry.
Have you used the same pinentry with gpg-1.4.X?
Can you please try to apply the following patch so we know what is the error code?
Thanks!
And the winner is... ** ERROR **: could not grab keyboard (3) GDK_GRAB_NOT_VIEWABLE the grab window or the confine_to window are not viewable. You did not answer, have you used the same pinentry with previous version? It doesn't look like it. According to emerge.log pinentry was first installed in january 2007 and my last successful signing was done in october 2006. Created attachment 109354 [details, diff] pinentry-0.7.2-debug.patch Please try this one, it is the patch from comment#4. I tried it. It didn't change anything afaics. Hello gnome, I will appreciate any thought regardging this issue. Here's the relevant portion of code from pinentry: 88 /* Grab the keyboard for maximum security */ 89 static void 90 grab_keyboard (GtkWidget *win, GdkEvent *event, gpointer data) 91 { 92 if (!pinentry->grab) 93 return; 94 95 if (gdk_keyboard_grab (win->window, FALSE, gdk_event_get_time (event))) 96 g_error ("could not grab keyboard"); 97 } Looking at it, the patch in comment #7 should probably work. Without more info (does the error code change with that patch?) I can't help more... (In reply to comment #11) > Looking at it, the patch in comment #7 should probably work. Without more info > (does the error code change with that patch?) I can't help more... > Thanks! As per comment#8, it seems that the same error code is produced... Maurice: Can you please re-verify that? Done. There is no change. It still fails sometimes with the same error code. Finally, can open bugs in upstream. Created attachment 122155 [details, diff]
fix
This patch changes the map/unmap events, that seem to occur too early, with expose/no-expose events. This seems to fix the bug.
Yes, it looks like this patch solves the problem. Thanks! Thank you!!! Please check 0.7.4, werner reverted this patch with something else... Thanks! Thanks for the heads-up. And you were right to be concerned; the problem is back again. Pinentry 0.7.4 is broken: /pinentry> pinentry OK Your orders please GETPIN ** ERROR **: could not grab keyboard aborting... Aborted /pinentry> Thanks! I don't know how you can reproduce this. Patch readded. |