Commit Graph

34 Commits (main)

Author SHA1 Message Date
Michael Stapelberg 1b9b2bd7f8
set _NET_WM_BYPASS_COMPOSITOR hint to avoid flickering (#256)
For compositors which support it (picom >v7.5, formerly known as compton), this
should result in the i3lock window no longer being composited, hence fixing
issue #204.

related to #204
2020-01-20 22:17:01 +01:00
ivanvig 7e3c06c85b added WM_CLASS property 2019-01-15 16:10:39 -03:00
Karl Tarbe 1668b2fc0f Fix memory leak when grabbing fails 2018-03-09 17:04:20 +02: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
Michael Stapelberg d3636246de Measure wall-clock time instead of CPU time for “locking” indicator. (#153)
related to https://github.com/i3/i3lock/issues/35
2017-10-22 00:32:57 +02:00
Ingo Bürk 10416e270b Revert "Fix covering of composited notifications (#96)" (#133)
This reverts commit 80d4452ec6.

fixes #130
2017-06-20 09:53:42 +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
martin 80d4452ec6 Fix covering of composited notifications (#96)
Use the XComposite extension to get the composite overlay window,
instead of just using the normal root window. This ensures that
composited windows are covered.
2017-03-26 09:01:23 -04: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
martin 402254b575 Flush xcb connection after opening fullscreen window (#74)
We need to ensure that the window handle is valid, i. e. the window is
actually created and accessible, before returning.

This is necessary because we immediately fork after returning, and the
child process opens its own X11 connection and expects the window handle
to be valid.

Fixes #46
2016-05-25 22:19:17 +02: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
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
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
Philippe Virouleau 6c34f6aa40 Turn on the screen on successful authentication
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.

Fixes #1114
2013-11-12 08:24:14 +01:00
Axel Wagner e69b98561b Set window name 2013-04-11 22:54:48 +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 1da637c419 skip shift when getting the modifier mask (Thanks SardemFF7) 2012-05-30 16:53:16 +02:00
Michael Stapelberg 406fa5e2c4 Bugfix: Copy the color depth from parent (root) window instead of hardcoding to 24 (Thanks hafron) 2012-01-15 16:15:05 +00:00
Michael Stapelberg 02655d2ddf Fix a few memory leaks 2012-01-03 22:31:16 +00:00
Michael Stapelberg 57585bef70 Refactor the unlock indicator into its own source code file 2012-01-03 20:56:05 +00:00
Michael Stapelberg 6f50a997b8 change ALL the copyrights! 2012-01-03 18:20:37 +00:00
Michael Stapelberg 1b757b2aa9 Properly free X11 resources (fixes DoS bug) (Thanks Merovius) 2011-12-28 23:05:02 +01: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 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 f6af085784 Move static byte arrays to xcb.c (fixes compilation warnings) 2010-07-20 23:06:54 +02:00
Axel Wagner 0c4b4df75e Port the pointer-code to xcb 2010-07-20 22:56:47 +02:00
Michael Stapelberg 7f42665245 grabbing: make the retry loop much slower (waits up to half a second)
This should fix a race condition where the Mod-key was not released
in time when starting i3lock using a key combination.
2010-07-20 21:07:39 +02:00
Michael Stapelberg c24922f0f2 Bugfix: Correctly error out when unable to grab pointer/keyboard 2010-07-20 20:52:58 +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 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