Right now when the screen locker starts it tries to grab the keyboard on
X. This fails if any other application has grabbed the keyboard.
In these situations the screen simply doesn't lock which is a pretty
This can't be realistically fixed properly on X, on wayland it's a
However, we can minimise the occasions when this occurs.
This patch emits a signal before locking and then tries the lack
multiple times. Clients can listen for this event and release their