Commit Graph

146 Commits (f9c30db62b61672410f7729d88c85a99679a6f71)

Author SHA1 Message Date
Michael Stapelberg 7fdda76a51 Fix the timeouts for hiding the unlock indicator (Thanks Merovius) 2011-12-29 02:56:28 +01:00
Michael Stapelberg 1b757b2aa9 Properly free X11 resources (fixes DoS bug) (Thanks Merovius) 2011-12-28 23:05:02 +01:00
Michael Stapelberg f216517bb0 Implement a visual unlock indicator 2011-12-28 20:28:18 +01:00
Michael Stapelberg 8e3c506c90 Properly implement -h (fixes error message about unknown option) 2011-11-06 14:11:20 +00:00
Michael Stapelberg 409025c7cc Get rid of superfluous \n in --version 2011-11-06 14:08:33 +00:00
Michael Stapelberg 28fe00c765 Bugfix: Properly detect the release of ISO_Level3_Shift (Thanks bacardi55) 2011-10-30 13:22:50 +00:00
Michael Stapelberg 9f6ef91337 Introduce --debug and some debugging options related to the Mode_switch / ISO_Level3_Shift thing 2011-10-29 23:28:11 +01:00
Michael Stapelberg 8e153411b5 Correctly handle Mode_switch/ISO_Level3_Shift (Thanks bacardi55)
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-29 23:23:41 +01:00
Michael Stapelberg a803ba931e Bugfix: Don’t re-grab pointer/keyboard on MappingNotify (Thanks wilmer)
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-10-24 21:23:33 +01:00
Michael Stapelberg 5932ee24a7 Throw an error when specifying an invalid pointer argument (-p) (Thanks TrickSTer) 2011-09-25 13:26:51 +01:00
Thorsten Töpper c81f8e8284 Fixed handle_screen_resize to build with NOLIBCAIRO enabled 2011-08-24 01:26:45 +02:00
Stefan Breunig c8eecefe83 handle screen resolution images and redraw the lock window 2011-08-17 15:46:52 +02:00
Michael Stapelberg e03e93fd1b optimization: render to pixmap which is used as background for the window
Before this commit, the background color (white by default) was visible for
about 100ms until the image was drawn. This flickering is now eliminated.

Also, we don’t need to handle Expose-events anymore, as X11 will use the
window’s background pixmap automatically.
2011-04-02 19:49:38 +02:00
Michael Stapelberg e7201e2df5 Mark handle_visibility_notify and handle_mapping_notify as static 2011-04-02 19:32:59 +02:00
Michael Stapelberg 6b0ce0d5aa cleanup indention left-overs 2011-03-13 20:24:25 +01:00
Michael Stapelberg 7128f80020 bump copyright 2011-03-13 20:23:39 +01:00
Michael Stapelberg c14cb4a250 Handle MappingNotify-events (Thanks Pascal) 2011-03-13 19:31:08 +01:00
Michael Stapelberg 53987df490 Bugfix: correctly check for errors when connecting to X11 2011-01-15 14:47:06 +01:00
Michael Stapelberg 7ba6f07322 add XK_KP_Enter as synonym for XK_Return 2010-11-09 19:35:16 +01:00
Michael Stapelberg f891929d34 Bugfix: Handle numpad keys correctly (Thanks Pascal) 2010-11-08 14:43:07 +01:00
Michael Stapelberg 3a22727bff Bugfix: When entering 512 characters, you could use neither return nor backspace (Thanks carl) 2010-11-06 18:02:44 +01:00
Michael Stapelberg c3affb1c61 Add a hint to the error message 'unknown option' when compiled with NOLIBCAIRO 2010-10-06 23:39:18 +02:00
Thorsten Töpper c643bb8e2f Make it possible to build i3lock without cairo. 2010-10-06 23:37:31 +02:00
Michael Stapelberg bdf6c6b45d comment out debug output (Thanks Ciprian) 2010-09-09 15:39:27 +02:00
Michael Stapelberg efde6a170d print version number when invoked with -v 2010-07-23 23:13:41 +02:00
Michael Stapelberg 3f168a54ce Re-implement tiling of image (-t) 2010-07-20 23:44:58 +02:00
Michael Stapelberg c1a34e7aa5 Fix compilation warning by including cairo-xcb 2010-07-20 23:09:09 +02:00
Axel Wagner 0c4b4df75e Port the pointer-code to xcb 2010-07-20 22:56:47 +02:00
Michael Stapelberg 89434b4a88 disable debug output which reveals the password
(full debug output will be disabled for the next release)
2010-07-20 21:18:53 +02:00
Michael Stapelberg 4e5c203cd9 Raise the i3lock window upon visibility notifies 2010-07-20 20:30:44 +02:00
Michael Stapelberg 9d19a8bb53 make event loop simpler (Thanks to Jamey Sharp)
As explained in Jamey’s post on the XCB mailing list, the event
loop can/should be written in a more simple way than it was before
in xcb-event. See:
<AANLkTinhIM320wUjSeHkBTVk4ysBuiSZkvfs8pMLVykO@mail.gmail.com>
or
http://lists.freedesktop.org/archives/xcb/2010-July/006292.html
2010-07-20 20:13:40 +02:00
Michael Stapelberg 6a52ba8bea err, xcb_image is not actually used 2010-07-17 01:08:30 +02:00
Michael Stapelberg 0777390a65 s/arry/array 2010-07-16 20:59:09 +02:00
Michael Stapelberg 1dc3fd7bf0 Initial commit of the XCB rewrite of i3lock
Changes:
- Uses XCB instead of Xlib (like i3), thus cleaner/faster code
- Uses cairo to load PNG images (*much* faster than XPM)
2010-07-16 17:35:51 +02:00
Axel Wagner b4c10df0fc Implement showing the default X- or a hardcoded Windows-Mousecursor. 2010-07-09 11:18:39 +02:00
Michael Stapelberg 2e5bee59d5 Skip keypresses without entering a password, they cause a delay
When suspending your system to RAM, a race-condition can occur which
causes many enter keypresses to be sent. These effectively delay
your login by 3 seconds times 50 times (or so), so we just skip empty
passwords. If your password is empty, you don’t need to lock your
screen anyway.
2009-12-10 20:24:58 +01:00
Michael Stapelberg ef1d47ce5b Some small cleanups 2009-08-02 21:47:39 +02:00
Jan-Erik Rediger 1cddfc4a98 adding option to enable tiling of images 2009-08-02 21:35:28 +02:00
Michael Stapelberg 206036a852 Skip leading # signs for the color, fix input validation 2009-08-02 19:50:30 +02:00
Jan-Erik Rediger 9c4dee2e86 adding option to choose background color 2009-08-02 19:38:38 +02:00
Michael Stapelberg 69a987db55 Handle error codes when loading the pixmap 2009-06-27 22:35:59 +02:00
Jan-Erik Rediger 189ee55bc0 i3lock now can use xpm images as background 2009-06-27 20:44:30 +02:00
Michael Stapelberg 4a9d3d7365 Implement options for forking, beeping and DPMS. Bump version to 1.0. 2009-05-10 12:48:16 +02:00
Michael Stapelberg 715e46b45e Implement PAM support (and retab! the file) 2009-05-10 12:22:41 +02:00
Michael Stapelberg 2105ce8cc7 Add a manpage and install it, update debian description 2009-03-11 23:44:39 +01:00
Michael Stapelberg 9167263286 Initial import of i3lock 0.9 2009-03-11 22:17:00 +01:00