From 918877ca124abccf7ae498c2cb01cec9b18874be Mon Sep 17 00:00:00 2001 From: "oshima@chromium.org" Date: Wed, 25 Jul 2012 07:07:17 +0000 Subject: Don't warp mouse if the cursor is locked, for now. We probably want to change this for window dragging and/or drag&drop. BUG=123160 TEST=manual Review URL: https://chromiumcodereview.appspot.com/10826005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148300 0039d316-1c4b-4281-b951-d872f2087c98 --- ash/display/mouse_cursor_event_filter.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ash/display') diff --git a/ash/display/mouse_cursor_event_filter.cc b/ash/display/mouse_cursor_event_filter.cc index 0ab6f1c..781742a 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()->is_cursor_locked()) return false; aura::RootWindow* current_root = target->GetRootWindow(); gfx::Point location_in_root(event->location()); -- cgit v1.1