Commit Graph

34 Commits (main)

Author SHA1 Message Date
Vyacheslav Chigrin 3b6511d4a5
Display current keyboard layout when user types password. (#341)
This feature can be enabled using the --show-keyboard-layout (or -k) flag.
2023-06-19 23:48:08 +02:00
Michael Stapelberg 0d8ce95cd0
unlock_indicator: only show caps lock and num lock (Thanks sandwm) (#324)
fixes #322
2022-06-21 09:43:46 +02:00
Michael Stapelberg ea1cb44a30 Switch build system from autotools to meson 2022-05-20 11:21:44 +02:00
Janczar Kurek deaf8b9f0f Display modifier key warning before unlocking, too
Info about mod keys such as Caps Lock is now displayed
during typing, not only on failed attempt.

Signed-off-by: Janczar Kurek <janczar.kurek@student.uj.edu.pl>
2022-05-18 21:28:59 +02:00
Michael Stapelberg 467e46c077 avoid pixmap allocations in the redraw path
Before this change, i3lock could become unusable on systems where pixmap
allocations take long.

I don’t know precisely why, but slow pixmap allocations is a symptom that my
computer sometimes exhibits, apparently when low on GPU memory.

In that situation, duplicate key press events would be processed (apparently
received from X11!), making correct password entry impossible.
2020-07-05 09:23:39 +02:00
Jeroen Roovers 3daf34bb03 unlock_indicator.c: fix build failure against gcc-10
On gcc-10 (and gcc-9 -fno-common) build fails as:

```
  CCLD     i3lock
ld: i3lock-unlock_indicator.o:i3lock/unlock_indicator.c:38:
  multiple definition of `input_position'; i3lock-i3lock.o:i3lock/i3lock.c:69: first defined here
ld: i3lock-unlock_indicator.o:(.bss+0x102): multiple definition of `__odr_asan.input_position'; i3lock-i3lock.o:(.bss+0x92b): first defined here
```

gcc-10 will change the default from -fcommon to fno-common:
https://gcc.gnu.org/PR85678.

The error also happens if CFLAGS=-fno-common passed explicitly.

Reported-by: Hans de Graaff
Bug: https://bugs.gentoo.org/706286
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2020-01-25 12:42:34 +00:00
Edward P cae21b65c6
Labels are now replaced with capital letters in the beginning 2019-01-15 00:11:19 +02:00
Michael Stapelberg f9c30db62b Respect Xft.dpi for determining the unlock indicator’s scale factor
fixes #184
2018-05-11 13:28:06 +02:00
Michael Stapelberg 6b53758e14
display error when backspace is pressed without any input (#172)
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
2018-01-14 22:17:43 +01:00
Michael Stapelberg a514472ec4 Rename xinerama.[ch] to randr.[ch] 2017-11-18 10:51:35 +01:00
Jasper Lievisse Adriaanse c1de117825 Rename all PAM-independant variables/comments.
there is nothing PAM-specific about pam_state or pam_state_t. therefore
rename them to be authenticator independant.
2017-04-15 09:44:09 +02:00
Bownairo 9c8ae8b5d1 Change input slices to be exactly pi/3 in size instead of slightly more (#107) 2017-01-10 09:01:19 +01:00
eplanet d2130092cf Display error message when locking failed (#99)
To give a feedback for when the pointer couldn't be grabbed,
displaying an error message before exiting.
2016-10-11 13:40:51 -07:00
eplanet 1c97a84847 Displaying locking message when grabbing the pointer/keyboard. (#88)
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.
2016-09-27 18:39:52 -07:00
Vasilij Schneidermann 893aff1bd0 Set font face (#89) 2016-08-18 11:53:19 -07:00
Michael Stapelberg 59705b05b5 Show unlock indicator if password was entered during PAM verification
fixes #51
2015-12-25 22:10:06 +01:00
Deiz dda29f93a1 Update copyright notices and get rid of ranges
The script used to make these changes can be found at:

   https://gist.github.com/Deiz/32322020f76d23e2bf8f
2015-04-21 11:53:09 -04:00
Deiz b4f6dae10e List generic pressed modifiers on failure 2015-03-29 16:22:31 -04:00
Alexandre Boeglin a9ecf1e0c9 Add capslock and numlock indicators
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>
2015-03-28 14:50:05 -04:00
Michael Stapelberg 68b78a7f57 clang-format -i **/*.[ch]
From here on, we’ll use clang-format to automatically format the source.

This has worked well in i3, so we are introducing it for i3lock.
2015-03-16 18:47:16 +01:00
koebi 0cbf483cb4 implemented logging the number of failed attempts
This closes #1243
2014-08-24 23:27:00 +02:00
Michael Stapelberg 6191590e5c Scale the unlock indicator (for retina displays) 2014-05-02 19:57:22 +02:00
Vytautas Šaltenis 2509c987d1 Extract start/stop timer code to reusable funcs 2014-03-11 09:11:20 +01:00
Sebastian Ullrich e0213cb1f5 Fix centering the indicator in the no-xinerama case 2013-03-29 10:14:01 +01:00
Michael Stapelberg fba88476dd remove support for NOLIBCAIRO, cairo-xcb is widespread by now 2012-10-26 20:42:26 +02:00
Michael Stapelberg e1d86a3279 use libxkbcommon for input handling
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-26 20:39:59 +02:00
Michael Stapelberg 9b29ae7afd Bugfix: Correctly center unlock indicator after reconfiguring screens (Thanks xn)
Fixes: #712
2012-05-19 21:13:03 +02:00
Michael Stapelberg dc2b6e5f39 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.
2012-04-01 12:28:28 +02:00
Michael Stapelberg 2053e9880a Bugfix: Fix background color when using cairo (Thanks Pascal) 2012-03-26 18:59:41 +02:00
Simon Kämpe f368bbd006 Added missing #ifndef NOLIBCAIRO
Needed to compile without libcairo.
2012-01-07 11:47:20 +00:00
Michael Stapelberg 5e14ad0605 draw the unlock indicator in the middle of every screen 2012-01-04 00:10:36 +00:00
Michael Stapelberg 02655d2ddf Fix a few memory leaks 2012-01-03 22:31:16 +00:00
Michael Stapelberg 0e7e009f45 Properly free timeouts, move one of the timeouts to unlock_indicator.c 2012-01-03 22:18:33 +00:00
Michael Stapelberg 57585bef70 Refactor the unlock indicator into its own source code file 2012-01-03 20:56:05 +00:00