Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1777)

Unified Diff: ash/common/accelerators/accelerator_controller.cc

Issue 2604093003: Don't mark virtual keyboard events as synthesized or distinguish between (Closed)
Patch Set: longer docs Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/accelerators/accelerator_controller.cc
diff --git a/ash/common/accelerators/accelerator_controller.cc b/ash/common/accelerators/accelerator_controller.cc
index db032bb3a8cafe407d68f3628775a7d7165a25af..4636e0ae21864f7d68c6b1e4ebe6fa261226cc34 100644
--- a/ash/common/accelerators/accelerator_controller.cc
+++ b/ash/common/accelerators/accelerator_controller.cc
@@ -169,12 +169,15 @@ bool CanHandleNextIme(ImeControlDelegate* ime_control_delegate) {
}
bool CanHandleCycleMru(const ui::Accelerator& accelerator) {
- // Don't do anything when Alt+Tab comes from a virtual keyboard. Touchscreen
- // users have better window switching options. See http://crbug.com/638269
+ // Don't do anything when Alt+Tab is hit while a virtual keyboard is showing.
+ // Touchscreen users have better window switching options. It would be
+ // preferable if we could tell whether this event actually came from a virtual
+ // keyboard, but there's no easy way to do so, thus we block Alt+Tab when the
+ // virtual keyboard is showing, even if it came from a real keyboard. See
+ // http://crbug.com/638269
keyboard::KeyboardController* keyboard_controller =
keyboard::KeyboardController::GetInstance();
- return !(keyboard_controller && keyboard_controller->keyboard_visible() &&
- (accelerator.modifiers() & ui::EF_IS_SYNTHESIZED));
+ return !(keyboard_controller && keyboard_controller->keyboard_visible());
}
// We must avoid showing the Deprecated NEXT_IME notification erronously.
« no previous file with comments | « no previous file | chrome/browser/extensions/api/virtual_keyboard_private/chrome_virtual_keyboard_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698