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

Unified Diff: ui/aura/env_input_state_controller.cc

Issue 2933353003: Mark the ET_MOUSE_MOVED created from a pointer grab as synthesized. (Closed)
Patch Set: Clarify comment. 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 | « content/browser/web_contents/web_contents_view_aura_browsertest.cc ('k') | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/env_input_state_controller.cc
diff --git a/ui/aura/env_input_state_controller.cc b/ui/aura/env_input_state_controller.cc
index 7e3b2916174e83790e28939fcaf8af62bde6c631..6807055790b1044d7a344d7e4fb648fca67ff36a 100644
--- a/ui/aura/env_input_state_controller.cc
+++ b/ui/aura/env_input_state_controller.cc
@@ -26,8 +26,11 @@ void EnvInputStateController::UpdateStateForMouseEvent(
break;
}
+ // If a synthesized event is created from a native event (e.g. EnterNotify
+ // XEvents), then we should take the location as we would for a
+ // non-synthesized event.
if (event.type() != ui::ET_MOUSE_CAPTURE_CHANGED &&
- !(event.flags() & ui::EF_IS_SYNTHESIZED)) {
+ (!(event.flags() & ui::EF_IS_SYNTHESIZED) || event.HasNativeEvent())) {
SetLastMouseLocation(window, event.root_location());
}
}
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura_browsertest.cc ('k') | ui/aura/window_tree_host_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698