Grab the Keyboard on the first user click
ClosedPublic

Authored by davidre on Jun 21 2019, 1:08 PM.

Details

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

Diff Detail

Repository
R166 Spectacle
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidre created this revision.Jun 21 2019, 1:08 PM
Restricted Application added a project: Spectacle. · View Herald TranscriptJun 21 2019, 1:08 PM
davidre requested review of this revision.Jun 21 2019, 1:08 PM
davidre updated this revision to Diff 60230.Jun 21 2019, 1:09 PM

Remove debugging code

davidre edited the summary of this revision. (Show Details)Jun 21 2019, 1:13 PM
ngraham accepted this revision.Jun 21 2019, 2:34 PM
ngraham added a subscriber: ngraham.

Looks like this is the best we can do for now. FWIW a git bisect revealed that this broke with D12626. :(

This revision is now accepted and ready to land.Jun 21 2019, 2:34 PM
This revision was automatically updated to reflect the committed changes.