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

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: get EnvInputStateController from Env Created 3 years, 8 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') | 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 7267f9f730fb16acf3731785463188ac560b774c..7e3b2916174e83790e28939fcaf8af62bde6c631 100644
--- a/ui/aura/env_input_state_controller.cc
+++ b/ui/aura/env_input_state_controller.cc
@@ -63,6 +63,11 @@ void EnvInputStateController::UpdateStateForTouchEvent(
void EnvInputStateController::SetLastMouseLocation(
const Window* root_window,
const gfx::Point& location_in_root) const {
+ // If |root_window| is null, we are only using the event to update event
+ // states, so we shouldn't update mouse location.
+ if (!root_window && Env::GetInstance()->mode() == aura::Env::Mode::MUS)
+ return;
+
client::ScreenPositionClient* client =
client::GetScreenPositionClient(root_window);
if (client) {
« no previous file with comments | « no previous file | ui/aura/mus/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698