Index: ash/display/mouse_cursor_event_filter.cc |
diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc |
index 0ab6f1cff0e09c1580095415b8ae1cf8c11c2050..0dc3f042646bdc20e5ca01897f2a8c5f2d395f71 100644 |
--- a/ash/display/mouse_cursor_event_filter.cc |
+++ b/ash/display/mouse_cursor_event_filter.cc |
@@ -5,6 +5,8 @@ |
#include "ash/display/mouse_cursor_event_filter.h" |
#include "ash/display/display_controller.h" |
+#include "ui/aura/cursor_manager.h" |
+#include "ui/aura/env.h" |
#include "ui/aura/event.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
@@ -28,7 +30,8 @@ bool MouseCursorEventFilter::PreHandleKeyEvent(aura::Window* target, |
bool MouseCursorEventFilter::PreHandleMouseEvent(aura::Window* target, |
aura::MouseEvent* event) { |
- if (event->type() != ui::ET_MOUSE_MOVED) |
+ if (event->type() != ui::ET_MOUSE_MOVED || |
+ aura::Env::GetInstance()->cursor_manager()->IsCursorLocked()) |
return false; |
aura::RootWindow* current_root = target->GetRootWindow(); |
gfx::Point location_in_root(event->location()); |