Commit Graph

25 Commits

Author SHA1 Message Date
d3de9f7fad Be more aggressive about handling user activity
Previously we only trigger unblanking or showing the unlock dialog if
core key or motion events come through.  Now we also do this when xinput
events come in.  We also now reset the last-user-activity time for core
events.

This also changes xcb-xembed to explicitly only handle core events.
2022-06-08 15:22:09 -07:00
b0c2ffc74a Drop unneeded dependency on 'x11' from locker 2022-05-30 18:57:28 -07:00
28bcbd2ab0 Don't consider dialog as still running if wait() fails
I'm not sure if we can trust the state of things if the wait() call
actually fails (as in, the call itself returns an error), so let's just
let the dialog die and hope that if there's more user activity it'll
start up again properly.
2022-05-30 18:44:49 -07:00
5405d3081e Increase dialog exit status parsing safety in the locker
This also stops using -1 as auth failed, and moves all failure statuses
to positive numbers.  It looks like Exiting with -1 ends up setting the
status to 255 on exit, but then in the locker, it sees this as 255 and
not -1, since things get coerced into 32-bit integers.
2022-05-30 18:43:29 -07:00
50a5e94307 Some low-effort visibility hygiene 2022-05-27 18:38:30 -07:00
8657bc249c Stop threading the xcb connection everywhere
Easier to just store a reference to it in the structs.
2022-05-27 18:35:38 -07:00
761b906fb7 Split Monitor detection/creation 2022-05-27 18:16:02 -07:00
e89b6cb604 Make monitor resource freeing better 2022-05-27 18:11:20 -07:00
a516a25a9f Use regular X11 rather than XFIXES to hide cursor
The semantics of the XFIXES cursor hide deal are annoying and make
things harder.
2022-05-27 18:05:55 -07:00
344907f55a Avoid unmatched ShowCursor/HideCursor requests 2022-05-24 20:32:15 -07:00
63a176c26e Major refactor of locker
Moves the meat of the screensaver into its own file, and separates out
the subservice stuff.
2022-05-24 19:52:21 -07:00
8eb8dfac2e Refactor a bit and add backlight brightness keys handling
This will only work if the video driver supports the xrandr backlight
property.  It's possible only Intel does this...
2022-05-23 20:27:59 -07:00
c3166f0b9c Don't forward enter or escape to unlock window on first event
If the user presses enter or escape in order to get the unlock dialog to
show in the first place, forwarding that event to the dialog will only
cause it to close immediately.

Also took the opportunity to clean up the dependencies where I have my
own patches.  I'm now using the cargo 'patch' section so that the
dependencies specified in the individual Cargo.toml files are clean.
2022-05-17 19:56:34 -07:00
9e266894df Fix restart and exit commands not returning replies 2022-05-15 22:04:13 -07:00
8394d45d1a Have remote commands return a success/failure message 2022-05-14 17:48:34 -07:00
f6c1020535 Remove the need for rust nightly
My pidfd implmentation is simple enough, and Option.contains() is not
worth requiring nightly.
2022-05-14 00:17:50 -07:00
992f32330c Hide mouse pointer when blanked 2022-05-14 00:17:50 -07:00
cab7d4bfe5 Do xrandr version check on init 2022-05-14 00:17:50 -07:00
64dc809295 Properly init xfixes extension 2022-05-14 00:17:50 -07:00
e588988254 Fix pointer-to-monitor location code 2022-05-14 00:17:50 -07:00
23fef4d9e3 Support stable rust
This removes use of Option.contains(), and provides a fallback pidfd
implementation for stable.
2022-05-14 00:17:50 -07:00
fcb997bfb3 Move config parsing to util crate 2022-05-04 16:15:39 -07:00
2ae04ff91a Add example config 2022-05-04 00:49:24 -07:00
92504d279a Add 'New Login' button to unlock dialog 2022-05-04 00:48:53 -07:00
2e86445c3d Initial import. Most things seem working.
This includes an abortive attempt to do a gtk4 dialog (which I don't
think is possible, as gtk4 doesn't allow embedding toplevels anymore),
and an iced dialog, which I just never started writing.
2022-05-03 17:05:06 -07:00