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

Unified Diff: ui/base/accelerators/accelerator_history.cc

Issue 2923723002: Avoid toggling app list if interrupted by mouse (Closed)
Patch Set: Rebase and refactor is_interrupted_by_mouse_event() to interrupted_by_mouse_event() Created 3 years, 5 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 | « ui/base/accelerators/accelerator_history.h ('k') | ui/wm/core/accelerator_filter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/accelerators/accelerator_history.cc
diff --git a/ui/base/accelerators/accelerator_history.cc b/ui/base/accelerators/accelerator_history.cc
index 94e78da26927d3cca60b718d5c2ca74fefcfd1cd..e4fbc8130f04c772de74cb17e28fea93b631baa0 100644
--- a/ui/base/accelerators/accelerator_history.cc
+++ b/ui/base/accelerators/accelerator_history.cc
@@ -31,4 +31,11 @@ void AcceleratorHistory::StoreCurrentAccelerator(
}
}
+void AcceleratorHistory::InterruptCurrentAccelerator() {
+ if (current_accelerator_.key_state() == Accelerator::KeyState::PRESSED) {
+ // Only interrupts pressed keys.
+ current_accelerator_.set_interrupted_by_mouse_event(true);
+ }
+}
+
} // namespace ui
« no previous file with comments | « ui/base/accelerators/accelerator_history.h ('k') | ui/wm/core/accelerator_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698