Try getting the X keyboard grab multiple times
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
Wrote relevant matching kwin patch to close effects
"sleep 5 ; loginctl lock-session" whilst a desktop effect was active
still locked the session
Subscribers: zzag, broulik, plasma-devel
Differential Revision: https://phabricator.kde.org/D20804