Hide the mouse cursor when the user presses most keys in mash

Desktop / Chromium - Elliot Glaysher [chromium.org] - 17 July 2017 15:09 EDT

In non-mash mode, chromeos uses a list of keys in cursor_manager_chromeos.cc to determine whether pressing a key should hide the cursor. This patch adds a window manager interface which lets the window manager send a list of EventMatchers which will determine whether the cursor is shown or hidden after a key event.

Note: This does not yet deal with key events generated by the accessibility keyboard.

Bug: 637853 Change-Id: I2bbb66562b2ded407fc6b05f9b02f1ed18704613 Reviewed-on: https://chromium-review.googlesource.com/570766

ce74024 Hide the mouse cursor when the user presses most keys in mash.
ash/mus/BUILD.gn | 2 +
ash/mus/event_matcher_util.cc | 60 +++++++++++++++
ash/mus/event_matcher_util.h | 33 ++++++++
ash/mus/window_manager.cc | 38 +++++++++
ash/mus/window_manager.h | 4 +
services/ui/public/interfaces/event_matcher.mojom | 2 +-
services/ui/public/interfaces/window_manager.mojom | 8 ++
services/ui/ws/event_dispatcher.cc | 37 +++++++++
services/ui/ws/event_dispatcher.h | 14 ++++
services/ui/ws/event_dispatcher_delegate.h | 2 +
services/ui/ws/event_dispatcher_unittest.cc | 89 ++++++++++++++++++++++
services/ui/ws/event_matcher.cc | 6 ++
services/ui/ws/event_matcher.h | 21 +++--
services/ui/ws/window_manager_state.cc | 10 +++
services/ui/ws/window_manager_state.h | 4 +
services/ui/ws/window_tree.cc | 7 ++
services/ui/ws/window_tree.h | 2 +
ui/aura/mus/window_manager_delegate.h | 4 +
ui/aura/mus/window_tree_client.cc | 8 ++
ui/aura/mus/window_tree_client.h | 2 +
ui/aura/test/mus/test_window_manager_client.cc | 3 +
ui/aura/test/mus/test_window_manager_client.h | 2 +
ui/events/mojo/keyboard_codes.mojom | 13 ++++
23 files changed, 362 insertions(+), 9 deletions(-)

Upstream: git.chromium.org


  • Share