On Thu, Dec 07, 2006, Julien Cristau wrote: > gdk_grab_keyboard() > returns 3
This is GDK_GRAB_NOT_VIEWABLE which only happens when XtGrabKeyboard returns GrabNotViewable which happens when the underlying X11 widget isn't realized (XtGrabKey(3)). I suspect the gdk_grab_keyboard() call happens too early, but the "map-event" signal which triggers gdk_grab_keyboard() is already very late in the gtk_widget_realize() process. Could you try adding gtk_widget_realize(win); in the middle of grab_keyboard()? At least pinentry-gtk2 works as good as before for me after this change. :) The ugly workaround would be to retry with some sleep until the window can be grabbed. -- Loïc Minier <[EMAIL PROTECTED]>

