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

Unified Diff: ui/aura/root_window.cc

Issue 160563002: Aura: don't synthesize mouse moves while holding pointer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 10 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 | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/root_window.cc
diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc
index 128a04424d45ae084e9b6ecfbd659e1d1b42979a..f0647edd81734ba4fcc9aab91a174e2d6a53249c 100644
--- a/ui/aura/root_window.cc
+++ b/ui/aura/root_window.cc
@@ -776,6 +776,14 @@ ui::EventDispatchDetails RootWindow::DispatchHeldEvents() {
void RootWindow::PostMouseMoveEventAfterWindowChange() {
if (synthesize_mouse_move_)
return;
+ // Don't synthesize mouse move while holding mouse.
+ // We also clear the held move event since held event target location may
+ // be wrong now (see comments in DispatchHeldEvents).
+ if (move_hold_count_) {
+ if (held_move_event_ && !dispatching_held_event_)
+ held_move_event_.reset();
+ return;
sky 2014/02/13 17:49:04 If you do this, don't we need to ensure when mouse
dgozman 2014/02/13 17:55:06 There is already a drop of held moves on the line
+ }
synthesize_mouse_move_ = true;
base::MessageLoop::current()->PostNonNestableTask(
FROM_HERE,
« no previous file with comments | « no previous file | ui/aura/root_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698