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

Unified Diff: ui/aura/env_input_state_controller.cc

Issue 2779093004: Update event states in Env when target window has been destroyed. (Closed)
Patch Set: test Created 3 years, 9 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/mus/window_tree_client.cc » ('j') | ui/aura/mus/window_tree_client.cc » ('J')
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 7267f9f730fb16acf3731785463188ac560b774c..d856b496821d72741ab4553e25e6baa16dd46b26 100644
--- a/ui/aura/env_input_state_controller.cc
+++ b/ui/aura/env_input_state_controller.cc
@@ -26,7 +26,9 @@ void EnvInputStateController::UpdateStateForMouseEvent(
break;
}
- if (event.type() != ui::ET_MOUSE_CAPTURE_CHANGED &&
+ // If |window| is null, we are only using |event| to update event states, so
+ // we shouldn't update mouse location.
+ if (window && event.type() != ui::ET_MOUSE_CAPTURE_CHANGED &&
!(event.flags() & ui::EF_IS_SYNTHESIZED)) {
SetLastMouseLocation(window, event.root_location());
}
« no previous file with comments | « no previous file | ui/aura/mus/window_tree_client.cc » ('j') | ui/aura/mus/window_tree_client.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698