When no ignore_empty_password flag is specified, but Enter key is held
down for some time, i3lock enters a finite, but hours-long loop
verifying empty password. Don't do that, skip empty password
verification if nothing was pressed after last Enter keypress.
When you start typing a password and then wander off, let's discard that
attempt after a few minutes of inactivity (and turn off the monitors if
dpms is on).
This is a real actual case of making the software cat-proof: when my cat
treads over the keyboard at night, I don't want the monitors to shine
for the rest of the night.
Also add flag for number of seconds to wait for it.
When user cancels the password or enters a wrong one, i3lock will wait
for some time before putting the monitors back to sleep. By default it's
30 seconds, but this flag allows to control that.
As described in ticket #1114, the screen may be left turned off on successful
authentication. This commit fixes this behaviour by turning the screen back on
after the authentication.
Re-raise i3lock when obscured in a separate process
This is cleaner than commit a305e62 (running authentication in a
separate process) because we don’t lose the feature that X11 will buffer
KeyPresses for us while the process blocks on PAM. See
http://cr.i3wm.org/patch/305 for the amount of code (and new known bugs)
that would have to be introduced to make a305e62 work.
oblique [Thu, 17 Oct 2013 10:35:33 +0000 (13:35 +0300)]
Bug fix: Call clear_input() when the password is wrong.
clear_input() calls start_clear_indicator_timeout() to clear the
indicator after 1 second. This had as a result the screen to be cleared
when the "verifying…" message was showed, so the "wrong!" message didn't
show up when the password was wrong.
When having i3bar in “hide” mode, it could previously be brought up
while the authentication was running. This is not 100% fixed with this
change, but a lot better, as the normal “raise i3lock to the top”
behavior is not blocked now anymore.
Vincent Bernat [Mon, 26 Aug 2013 21:39:38 +0000 (23:39 +0200)]
Add `-e` option to not validate empty password.
When the XF86ScreenSaver key is used to put a laptop to sleep (or to
trigger the screensaver), the key may "bounce" on resume. This is
annoying as i3lock will try to validate several empty passwords and
wait several seconds before accepting a legit password.
Some users may want to validate an empty password: PAM may rely on
other sources to unlock the screen, like the presence of a token or
the proximity of some Bluetooth device. Hence, we don't forbid this
possibility and provide an command-line option for users not willing
to validate empty passwords.
Now enter a character, say "a", then press CapsLk (which is now
Shift_Lock), then press "a" again. The event state is 0x1, thereby
undistinguishable from normal shift.
The Debian packaging is now hosted on Debian servers at
git://git.debian.org/users/stapelberg/i3lock.git
This makes life easier for Debian people. It makes life harder
for you if you want to build a Debian package of the current
git version. Here is how you could do that now:
Build a tarball of the current git version:
mkdir ../i3lock-dpkg
VERSION=i3lock-$(git describe --tags)
git archive --prefix=$VERSION/ --output=../i3lock-dpkg/$VERSION.tar.bz2 HEAD
get the packaging:
cd ../i3lock-dpkg
gbp-clone git://git.debian.org/users/stapelberg/i3lock.git
cd i3lock
git-import-orig ../$VERSION.tar.bz2
dpkg-buildpackage
Use (void) instead of () for functions without args (Thanks fernandotcl)
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.
If the specified file does not exist or is invalid, previously, the unlock
indicator wouldn’t show up at all, because the invalid surface was still used.
With this commit, i3lock will react like if you didn’t specify an image at all.
I tested this with the following experiment:
$ setxkbmap 'us(intl)'
$ xmodmap ~/configfiles/midna/Xmodmap
$ xmodmap -e 'keycode 38 = a A adiaeresis Adiaeresis o O'
$ xmodmap -e 'keycode 49 = ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift ISO_Level3_Shift'
Then, Mode_switch + a yields ä, but ` + a yields o.
In i3lock, these were swapped (Mode_switch + a yielded o, while ä was not
reachable at all). The comment in the code explains it
(See http://code.stapelberg.de/git/configfiles for the Xmodmap)