[pkg-gnupg-maint] Bug#851707: pinentry-gtk-2 frequently fails to grab the keyboard under awesome
Vincent Lefevre
vincent at vinc17.net
Mon Feb 6 09:49:44 UTC 2017
On 2017-02-02 19:29:19 +0100, Vincent Bernat wrote:
> Index: pinentry-1.0.0/gtk+-2/pinentry-gtk-2.c
> ===================================================================
> --- pinentry-1.0.0.orig/gtk+-2/pinentry-gtk-2.c
> +++ pinentry-1.0.0/gtk+-2/pinentry-gtk-2.c
[...]
> - while (tries++ < max_tries && err == GDK_GRAB_NOT_VIEWABLE);
> + while (tries++ < max_tries && err == GDK_GRAB_NOT_VIEWABLE
> + && (usleep(1000), TRUE));
[...]
> while (tries++ < max_tries && (err == GDK_GRAB_NOT_VIEWABLE
> - || err == GDK_GRAB_ALREADY_GRABBED));
> + || err == GDK_GRAB_ALREADY_GRABBED)
> + && (usleep(1000), TRUE));
I don't know how it has eventually been fixed, but FYI, usleep()
is obsolete. The usleep(3) man page says:
CONFORMING TO
4.3BSD, POSIX.1-2001. POSIX.1-2001 declares this function
obsolete; use nanosleep(2) instead. POSIX.1-2008 removes the
specification of usleep().
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
More information about the pkg-gnupg-maint
mailing list