Index: ash/display/display_controller.cc |
diff --git a/ash/display/display_controller.cc b/ash/display/display_controller.cc |
index 7a3b6f9959daef8f7b0067eec767a425a89924be..949177e0feffbed4124b26b7fb8d8a905d7c0795 100644 |
--- a/ash/display/display_controller.cc |
+++ b/ash/display/display_controller.cc |
@@ -30,6 +30,7 @@ |
#include "ui/aura/client/capture_client.h" |
#include "ui/aura/client/focus_client.h" |
#include "ui/aura/client/screen_position_client.h" |
+#include "ui/aura/env.h" |
#include "ui/aura/window.h" |
#include "ui/aura/window_event_dispatcher.h" |
#include "ui/aura/window_property.h" |
@@ -537,6 +538,14 @@ void DisplayController::SetPrimaryDisplay( |
} |
void DisplayController::EnsurePointerInDisplays() { |
+ if (!aura::Env::GetInstance()->mouse_moved() && |
pkotwicz
2015/02/06 16:12:44
I am unsure whether checking whether the mouse was
|
+ Shell::initially_hide_cursor()) { |
+ // Do not move the cursor if the cursor has not yet been moved and the |
+ // cursor is initially hidden. Moving the cursor generates a mouse event |
+ // which shows the cursor. |
+ return; |
+ } |
+ |
// If the mouse is currently on a display in native location, |
// use the same native location. Otherwise find the display closest |
// to the current cursor location in screen coordinates. |