Commit Graph

166 Commits (main)

Author SHA1 Message Date
Michael Stapelberg a7ebe81de1
load_keymap: handle error without corrupting global state (#353)
fixes https://github.com/i3/i3lock/issues/351
2024-04-10 08:09:55 +02:00
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 3216c40504 clang-format 2022-05-18 21:30:45 +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
Panagiotis Vasilopoulos eb761b16ad
Changed background color to #a3a3a3 (#300) 2021-05-20 17:35:26 +02:00
felipe stival ed7185dca8
Throw error when trying to start on Wayland (#290) 2020-10-02 14:49:39 +02:00
Michael Ortmann 9f675b8a85
Use explicit_bzero() where available, not just on OpenBSD (#282) 2020-07-15 23:53:19 +02:00
Michael Ortmann 526c743369 Make 2 more functions static 2020-07-15 02:02:57 +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
Michael Stapelberg 656fa39f82
fix: pam_end in cleanup in main, not in event loop (#257)
Thanks to joanbm for an incredible bug report.

fixes #254
2020-01-20 22:49:10 +01:00
Michael Stapelberg ad056ca396 Revert "Add option to lock TTY switching"
This reverts commit dcfcba3ed4.

As-is, this requires i3lock to be run with too many permissions, for a feature
which many users will never need. In issue #231, we concluded that interested
users are better off using a dedicated virtual console locker such as vlock(1).

related to #231
2019-07-21 10:16:16 +02:00
Martin Dørum aa7984f215 Add rgbx, xrgb, bgr, etc. formats (#234) 2019-05-23 21:03:48 -04:00
Martin Dørum 0be11444bc Remove shortopt from --raw (#232) 2019-05-23 19:07:51 -04:00
Martin Dørum ebf3428f10 Add a --raw option to read image as raw bytes (#226) 2019-05-20 08:20:55 -04:00
Ingo Bürk 78a601bf98
Merge pull request #213 from trickeydan/patch-1
Rename Win Key to Super Key
2019-04-12 08:29:09 +02:00
Nguyễn Thái Ngọc Duy aad012484e Remove \n from errx messages
errx() already appends \n internally. "\n" in the error message will
result in a blank line after the message.
2019-01-01 19:12:39 +07:00
Dan Trickey b33fd9dc9e
Rename Win Key to Super Key 2018-12-17 16:29:30 +00:00
Lorian Coltof dcfcba3ed4 Add option to lock TTY switching 2018-11-29 14:22:19 +01:00
Guillaume Maudoux 50c81d5717 Keep only the last attempt for retry_verification 2018-08-23 13:35:20 +02:00
Michael Stapelberg 28ad24e0ce clang-format-3.5 2018-05-11 13:40:18 +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
SegFault42 7a80375e1f return value corrected 2018-02-12 00:48:28 +01:00
Emeric Planet b34ae89d30 Check PNG file compliance (#171) 2018-01-30 22:50:38 +01: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 ef4f9e4057
Switch to autotools (#163)
This was largely copied from the i3 configure.ac and Makefile.am.
2017-12-02 10:08:54 +01:00
Michael Stapelberg a514472ec4 Rename xinerama.[ch] to randr.[ch] 2017-11-18 10:51:35 +01:00
Michael Stapelberg c311d1c5a3 Use RandR for learning about attached monitors
The code now tries the following options, in order:

• obtain monitors via RandR 1.5
• obtain outputs via RandR ≤ 1.4
• obtain screens via Xinerama

fixes #159
related to #101
related to #148
related to #149
2017-11-18 10:48:25 +01:00
Michael Stapelberg 5b4d45a8af SetInputFocus to the i3lock window to force-close context menus (#155)
When grabbing the pointer/keyboard fails, a new code path is activated, which:

1. Uses the standards-compliant _NET_ACTIVE_WINDOW root window property to
   determine the window to restore focus to.

2. Sets the input focus to the i3lock window, thereby possibly force-closing
   open context menus (works with e.g. Google Chrome, does not work with
   e.g. thunar, gedit).

3. Upon exiting, restores focus to the window from step ① by sending a
   _NET_ACTIVE_WINDOW ClientMessage to the root window. Note that this step
   requires https://github.com/i3/i3/pull/3027 in i3 to not mess up focus.

fixes https://github.com/i3/i3lock/issues/35
2017-10-22 22:16:34 +02:00
Orestis 8eecef62fb Immediately hide the unlock indicator after ESC / C-u (#145) 2017-10-21 23:15:15 +02:00
Ingo Bürk 698204a987 Merge pull request #135 from grandchild/fix_optind_overwrite
Fix shadowing of getopt optind
2017-08-13 17:26:38 +02:00
Ran Benita 76d9960dbe Change the locale discovery procedure to treat empty string same as unset
This is explained in the commit message here:
f468f0b243
2017-08-13 18:08:39 +03:00
jakob cddb87420b Fix overwrite of getopt optind
Using 'optind' in getopt_long() shadows actual 'optind' being provided
by getopt, thus prevents any future options change from using optind.

See https://www.gnu.org/software/libc/manual/html_node/Getopt-Long-Options.html#index-getopt_005flong
2017-07-06 17:08:12 +02:00
Jasper Lievisse Adriaanse ea65a5292d Restore intended behaviour and don't use mlock(2) on OpenBSD. 2017-04-17 21:06:19 +02:00
Jasper Lievisse Adriaanse 68fc2e8b5f Use bsd_auth(3) instead of PAM on OpenBSD
Also apply two security measures for OpenBSD:
- use explicit_bzero(3)
- mlock(2) works for non-root users too
2017-04-17 15:06:59 +02:00
Jasper Lievisse Adriaanse 15973d1f52 Move all PAM code behind UES_PAM and enable that by default. 2017-04-15 09:49:41 +02: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
Nicolò Balzarotti 7504e16527 Add Enter on C-m (#103) 2016-11-09 13:23:01 -08: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
Diogo Ferreira fd2215b0f0 i3lock: Stop leaking the image_path dup. (#93) 2016-09-13 21:59:54 +02:00
koebi 17b7b77893 unlock automatically after authentication failure (#90)
This will make i3 unlock automatically after authentication failure and
correct input without pressing <Enter> again after the "wrong"-indicator
is gone.
2016-09-04 18:22:49 +02:00
Florian Zipperle cca7d4e6c3 Removed obsolete inactivity timeout (#84)
* Removed obsolete inactivity timeout
2016-07-20 07:50:07 +01:00
Michael Stapelberg ce1c5cecc0 clang-format-3.5
Not sure why travis didn’t warn about this on the PR. The only reference
to the PR I can find is https://travis-ci.org/i3/i3lock/builds/130470377
2016-06-03 17:46:29 +02:00
Christoph Ruegge 463d38fed6 Add support for `xss-lock --transfer-sleep-lock' (#75)
Add support for `xss-lock --transfer-sleep-lock'
2016-05-25 22:21:12 +02:00
Karl Tarbe 9a7604bb35 Allow CTRL+J as enter and CTRL+H as backspace (#72)
fixes #71
2016-04-30 11:25:51 +01:00
Michael Stapelberg 59705b05b5 Show unlock indicator if password was entered during PAM verification
fixes #51
2015-12-25 22:10:06 +01:00
Michael Stapelberg 0bdc0c644d Eat XKB_KEY_Delete and XKB_KEY_KP_Delete (Thanks bebehei)
fixes #50
2015-12-25 15:44:46 +01:00
Michael Stapelberg cc73d88aea Remove libxkbfile dependency from README.md/comments
It has not been in use since commit 7eb43aeabd
2015-11-07 14:51:02 +01:00
Michael Stapelberg 688d49d5b8 fix pam_securetty: set PAM_TTY to getenv("DISPLAY")
fixes #43
2015-11-05 23:22:08 +01:00
Michael Stapelberg 929e541fb7 Remove DPMS support in favor of a wrapper script and xset(1).
fixes #32
2015-08-11 21:50:42 +02:00
Kenneth Lyons d91c20a9f2 Indicate that the --inactivity-timeout option takes an argument. 2015-07-02 14:45:30 -07:00