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

Unified Diff: ui/aura/window_event_dispatcher.cc

Issue 387863003: aura: Do not synthesize a mouse-move event during a drag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test Created 6 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 | « no previous file | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_event_dispatcher.cc
diff --git a/ui/aura/window_event_dispatcher.cc b/ui/aura/window_event_dispatcher.cc
index 516d0ce48ca2fa755a26e9a004480ddcf919afde..2e42a9559614609352bad7f2b3e80ff9ba60bdd0 100644
--- a/ui/aura/window_event_dispatcher.cc
+++ b/ui/aura/window_event_dispatcher.cc
@@ -694,6 +694,15 @@ ui::EventDispatchDetails WindowEventDispatcher::SynthesizeMouseMoveEvent() {
if (!synthesize_mouse_move_)
return details;
synthesize_mouse_move_ = false;
+
+ // If one of the mouse buttons is currently down, then do not synthesize a
+ // mouse-move event. In such cases, aura could synthesize a DRAGGED event
+ // instead of a MOVED event, but in multi-display/multi-host scenarios, the
+ // DRAGGED event can be synthesized in the incorrect host. So avoid
+ // synthesizing any events at all.
+ if (Env::GetInstance()->mouse_button_flags())
+ return details;
+
gfx::Point root_mouse_location = GetLastMouseLocationInRoot();
if (!window()->bounds().Contains(root_mouse_location))
return details;
« no previous file with comments | « no previous file | ui/aura/window_event_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698