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

Unified Diff: ui/wm/core/accelerator_filter.cc

Issue 1117173003: Converting (Alt+LeftClick -> RightClick) to (Search+LeftClick -> RightClick) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: ui/wm/core/accelerator_filter.cc
diff --git a/ui/wm/core/accelerator_filter.cc b/ui/wm/core/accelerator_filter.cc
index 12e91316d21ce81ce0c8906c851bf13f24cedf83..3661fc529d8d538271f11c988d995968c7b540cc 100644
--- a/ui/wm/core/accelerator_filter.cc
+++ b/ui/wm/core/accelerator_filter.cc
@@ -71,6 +71,13 @@ void AcceleratorFilter::OnKeyEvent(ui::KeyEvent* event) {
event->StopPropagation();
}
+void AcceleratorFilter::OnMouseEvent(ui::MouseEvent* event) {
+ // When a mouse event is interleaved between two key accelerators, we must
+ // clear the current accelerator in the accelerator history by setting it to
+ // a default empty key accelerator.
sadrul 2015/05/01 03:21:18 Interesting! Would it be possible to write a test
afakhry 2015/05/02 00:02:42 I don't this will create any issues. There are onl
+ accelerator_history_->StoreCurrentAccelerator(ui::Accelerator());
+}
+
ui::Accelerator CreateAcceleratorFromKeyEvent(const ui::KeyEvent& key_event) {
const int kModifierFlagMask =
(ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN);
« chrome/browser/chromeos/events/event_rewriter_unittest.cc ('K') | « ui/wm/core/accelerator_filter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698