Commit Graph

11 Commits (3216c40504b7c65f5877ef798b5ea41db28f2ab6)

Author SHA1 Message Date
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
Jasper Lievisse Adriaanse 5aff9594aa Remove last traces of DPMS 2017-04-14 20:00:23 +02: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
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 fd64bde0cb Implement Xinerama support (not used yet) 2012-01-03 23:10:56 +00:00
Michael Stapelberg 57585bef70 Refactor the unlock indicator into its own source code file 2012-01-03 20:56:05 +00: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
Axel Wagner 0c4b4df75e Port the pointer-code to xcb 2010-07-20 22:56:47 +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