forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ash: Dispatch accelerators correctly in Tablet mode.
This is basically a "revert" of r155769, which landed 6 years ago. Problem: The hardware play/pause key currently stops working in the CrOS Audio Player in tablet mode. The event is not dispatched to the web contents. Note an external keyboard or USB headset can send this key event in tablet mode, even though events from a convertible's regular keyboard are suppressed. r155769 introduced logic that causes all accelerators to be processed as though they have the same priority as, e.g., Alt+Tab when the AppList is visible. Now, in tablet mode, the AppList _always_ declares itself visible. So currently no key combinations bound to Ash accelerators are dispatched to webcontents when in tablet mode. This is bad. r155769 was to fix https://crbug.com/142067 - "Ctrl+Space unable to switch keyboard layouts in the AppList". This occurred because an AppList button had focus, not the text field. To retain current behaviour, instead update the two Button subclasses to return false for SkipDefaultKeyEventProcessing(), thereby prioritizing accelerators over their 'space' activation. There are other buttons in the app list, but they do not currently forward space to the search box (See https://crbug.com/901245). These button types disappear or change focus to the search box when searching anyway - only SearchResultBaseView seems to really benefit from being able to handle Ctrl+Space. Bug: 899094 Test: AudioPlayerBrowserTest.NativeMediaKey Change-Id: I1cb585d88d57a775fdfa15ecfdce197ae52dfcdd Reviewed-on: https://chromium-review.googlesource.com/c/1312439 Commit-Queue: Trent Apted <[email protected]> Reviewed-by: Xiyuan Xia <[email protected]> Reviewed-by: Luciano Pacheco <[email protected]> Cr-Commit-Position: refs/heads/master@{#605219}
- Loading branch information
Showing
9 changed files
with
113 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters