Grab the Keyboard on the first user click

Authored by davidre on Jun 21 2019, 12:51 PM.

Description

Grab the Keyboard on the first user click

Summary:
If we enter the region selection when a right click menu is opened we lose focus.
Which is bad because not every user knows about double click to take the
screenshot and can't exit anymore. We get the mouse back when the user clicks
and only can grab the keyboard if we have the mouse already. So just grab it
unconditionally if we get a mouse event. The user still has to do one more click
than normal but can now exit/take the picture via keyboard.

CCBUG: 407843

Test Plan:

  • Open Rectangular Region Mode with a delay
  • Right click during the delay
  • Press escape to exit Spectacle

Reviewers: Spectacle, davidedmundson, ngraham

Reviewed By: Spectacle, ngraham

Subscribers: ngraham

Tags: Spectacle

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

Details

Committed
davidreJun 21 2019, 2:35 PM
Reviewer
Spectacle
Differential Revision
D21964: Grab the Keyboard on the first user click
Parents
R166:33f84020a75a: Remove Codename
Branches
Unknown
Tags
Unknown