Some drivers/displays don't support the xbacklight stuff, so fall back
to sysfs if needed. This usually will require some extra permissions
setup on the user's part.
When using a global key combo to lock the screen, often the WM (or
whatever) will still have an active grab on the keyboard by the time we
try to get our own grab.
Sometimes we get notifications from randr of changes where the new setup
is exactly like the old. The main annoying time this happens is when
the system resumes from suspend. This is probably why there's often a
flash of the desktop right after resuming: we're destroying the old
blanker windows and creating new ones, even though the setup is exactly
the same.
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.
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.
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.
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.
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.