summaryrefslogtreecommitdiff
path: root/i3lock.c
AgeCommit message (Collapse)Author
2013-11-10Re-raise i3lock when obscured in a separate processMichael Stapelberg
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.
2013-11-10Revert "Run authentification in different process"Michael Stapelberg
This reverts commit a305e622a6cad3f9ba267d6810fee54b7c7c86c3. In the next commit, the same functionality will be achieved in a cleaner way.
2013-11-10Revert "Bug fix: Call clear_input() when the password is wrong."Michael Stapelberg
This reverts commit 33d953fbdf4f8630e919643974f32ce6793c7c2b, in preparation for reverting commit a305e62
2013-10-20Bug fix: Call clear_input() when the password is wrong.oblique
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. First bad commit: a305e62
2013-09-19Run authentification in different processkoebi
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. fixes #895
2013-09-01Bugfix: update the initial keyboard modifier state (Thanks lee, Ran)Michael Stapelberg
This should make the numpad work correctly.
2013-08-31Add -e to --helpMichael Stapelberg
2013-08-31Add `-e` option to not validate empty password.Vincent Bernat
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.
2013-07-30Use cairo_status_to_string for descriptive errors.Bas Pape
2013-03-29fix ctrl-u handlingMichael Stapelberg
2013-03-29Fix resetting the password after failed authenticationsSebastian Ullrich
This has been broken by commit 661344.
2013-03-24Add ctrl+u password resetPhilip Dexter
2013-03-20Use ev_loop_fork after fork, this fix forking on kqueue based OSesBaptiste Daroussin
2013-02-07Limit the debug print to the actual password sizeQuentin Glidic
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
2012-12-06RGB color notation is 3-byte hexadecimalVivien Didelot
Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
2012-11-04Allow passwordless PAM conversations (e.g. fingerprint)Moritz Augsburger
2012-11-04Allow XKB_KEY_XF86ScreenSaver as synonm for enterMoritz Augsburger
This keysym is generated on convertible tablets by pressing a hardware lock/unlock button.
2012-10-26remove support for NOLIBCAIRO, cairo-xcb is widespread by nowMichael Stapelberg
2012-10-26use libxkbcommon for input handlingMichael Stapelberg
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).
2012-10-15s/pam_message/pam_response/ (Thanks Tucos)Michael Stapelberg
The previous code didn’t cause any issues since both types (currently!) have the same size.
2012-09-26promote the "could not load image" message from debug to normalMichael Stapelberg
2012-08-22only use mlock() on Linux, FreeBSD (for example) requires rootMichael Stapelberg
2012-06-29getopt_long returns int, don't cast to char.Fernando Tarlá Cardoso Lemos
On ARM, casting -1 to char turns it into something else. Fixes argument parsing on ARM. Thanks Chipaca for reporting.
2012-05-30revert shift lock handling (broke uppercase letters)Michael Stapelberg
With some layouts, this broke uppercase letters in your passwords. I think that explicit shiftlock handling is unnecessary. X11 seems to do it on its own. Here is what leads me to that conclusion: $ setxkbmap de $ xmodmap -e 'keycode 66 = Shift_Lock' $ xev 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.
2012-05-19Bugfix: Correctly center unlock indicator after reconfiguring screens ↵Michael Stapelberg
(Thanks xn) Fixes: #712
2012-04-01Use (void) instead of () for functions without args (Thanks fernandotcl)Michael Stapelberg
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.
2012-03-28Bugfix: fallback when the image cannot be loadedMichael Stapelberg
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.
2012-03-26Only output text when in debug mode (fixes problems with xautolock)Michael Stapelberg
2012-03-10Properly handle Caps Lock (Thanks Damien)Michael Stapelberg
2012-01-05Bugfix: Check for waiting X11 events before entering the event loopMichael Stapelberg
2012-01-05Change the unlock indicator properly after pressing the 'escape' keyMichael Stapelberg
2012-01-03Implement Xinerama support (not used yet)Michael Stapelberg
2012-01-03Properly free timeouts, move one of the timeouts to unlock_indicator.cMichael Stapelberg
2012-01-03remove the dead variable modeswitchmaskMichael Stapelberg
2012-01-03Properly free the reply of xcb_get_geometryMichael Stapelberg
2012-01-03Refactor the unlock indicator into its own source code fileMichael Stapelberg
2012-01-03Fork after the window is visible, not beforeMichael Stapelberg
2012-01-03change ALL the copyrights!Michael Stapelberg
2012-01-03Lock the password buffer in memory, clear it in RAM after verifyingMichael Stapelberg
2011-12-30support ISO_Level5_Shift (Thanks roland)Michael Stapelberg
2011-12-29Fix the timeouts for hiding the unlock indicator (Thanks Merovius)Michael Stapelberg
2011-12-28Properly free X11 resources (fixes DoS bug) (Thanks Merovius)Michael Stapelberg
2011-12-28Implement a visual unlock indicatorMichael Stapelberg
2011-11-06Properly implement -h (fixes error message about unknown option)Michael Stapelberg
2011-11-06Get rid of superfluous \n in --versionMichael Stapelberg
2011-10-30Bugfix: Properly detect the release of ISO_Level3_Shift (Thanks bacardi55)Michael Stapelberg
2011-10-29Introduce --debug and some debugging options related to the Mode_switch / ↵Michael Stapelberg
ISO_Level3_Shift thing
2011-10-29Correctly handle Mode_switch/ISO_Level3_Shift (Thanks bacardi55)Michael Stapelberg
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)
2011-10-24Bugfix: Don’t re-grab pointer/keyboard on MappingNotify (Thanks wilmer)Michael Stapelberg
This fixes bug http://bugs.i3wm.org/545, where characters (of your password) would rarely slip through when entering your password (especially) after resuming your notebook from suspend to RAM. The reason is that when resuming, X triggers one or more MappingNotify events. At the same time, CPU load is high. This leads to a race-condition between the ungrab and re-grab in which i3lock temporarily does not grab the keyboard. One way to fix this is using xcb_grab_server() before and xcb_ungrab_server() after the ungrab/re-grab. However, I think we actually don’t need to ungrab/re-grab at all. I seem to have put that code in here by mistake – in i3, we re-grab after MappingNotify, but there we only grab specific keys. In i3lock, we grab the whole pointer/keyboard, so there should be no need. If I’m incorrect and this breaks some subtle use-cases for people with strange layout setup, at least we can properly document on why we need it, after we put it back in ;).
2011-09-25Throw an error when specifying an invalid pointer argument (-p) (Thanks ↵Michael Stapelberg
TrickSTer)