This adds some feedback to a keypress which previously had no visible effect.
While the text “no input” isn’t the most descriptive, it was the only one I
could think of which fit into the unlock indicator circle. If you have a better
suggestion, let me know.
fixes#164
Display "locking…" message when grabbing the pointer/keyboard,
after at least 250 ms of unfruitful attempts. If grabbing
eventually fails, application will not fork and return 1.
When the unlock indicator warns the user that a password was typed
wrong, it now also reports the state of the capslock and numlock
modifiers.
Signed-off-by: Alexandre Boeglin <alex@boeglin.org>
Thanks to Ran Benita and Daniel Stone (the libxkbcommon authors) for
answering my questions and reviewing this code.
With this commit, input handling should be more correct with using less
code (in i3lock, that is).
See also:
http://article.gmane.org/gmane.linux.kernel/1268792
The C compiler will handle (void) as "no arguments" and () as "variadic
function" (equivalent to (...)) which might lead to subtle errors, such
as the one which was fixed with commit 0ea64ae4.