Try getting the X keyboard grab multiple times

Authored by davidedmundson on Jun 12 2019, 9:27 AM.

Description

Try getting the X keyboard grab multiple times

Summary:
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
rubbish state.

This can't be realistically fixed properly on X, on wayland it's a
non-issue.

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
keyboard grabs.

Test Plan:
Wrote relevant matching kwin patch to close effects
"sleep 5 ; loginctl lock-session" whilst a desktop effect was active
still locked the session

Reviewers: Plasma, KWin, zzag

Reviewed By: Plasma, KWin, zzag

Subscribers: zzag, broulik, plasma-devel

Tags: Plasma

Differential Revision: https://phabricator.kde.org/D20804

Details

Committed
davidedmundsonJun 12 2019, 9:27 AM
Reviewer
Plasma
Differential Revision
D20804: RFC: Try getting the X keyboard grab multiple times
Parents
R133:e9f1b2861560: Fix forward declaration
Branches
Unknown
Tags
Unknown