The description says "Grab keyboard only while window is focused", but the keyboard is
not grabbed at all.
grab_keyboard returns early if ! pinentry->grab, but merely dropping that does not yield
the expected behavior either, since the grab is not released on focus-out because the
event handler is not called. Running with GDK_DEBUG=events suggests that a different
focus-out event is generated while the keyboard is grabbed.