diff options
author | skaslev@chromium.org <skaslev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-06 20:49:22 +0000 |
---|---|---|
committer | skaslev@chromium.org <skaslev@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-06 20:49:22 +0000 |
commit | e7b31a66d26ee5c675ca6ade8ca9cc0a43c66d48 (patch) | |
tree | ca7111cd8b844b9357156a0767ef555ed9cdd41b /ash/wm/ash_native_cursor_manager.cc | |
parent | be8d972a2764e069e1c963399e902c4221d1e471 (diff) | |
download | chromium_src-e7b31a66d26ee5c675ca6ade8ca9cc0a43c66d48.zip chromium_src-e7b31a66d26ee5c675ca6ade8ca9cc0a43c66d48.tar.gz chromium_src-e7b31a66d26ee5c675ca6ade8ca9cc0a43c66d48.tar.bz2 |
Revert 198519 "Notify all visible renderers when the visibility ..."
> Notify all visible renderers when the visibility of the mouse cursor changes
>
> Blink side patch:
> https://codereview.chromium.org/14047016/
>
> The ultimate goal of both patches is to disallow new hover
> effects from being invoked in web contents when the mouse
> cursor is not visible to the user (i.e., while touch
> scrolling). The job of this patch is to communicate the
> cursor visibility state to all visible renderers using
> the new IPC InputMsg_CursorVisibilityChange whenever the
> visibility state changes.
>
> Added the new observer type CursorClientObserver.
> Subscribers (instances of RenderWidgetHostViewAura) are
> notified whenever the cursor visibility changes, at which
> point the IPC is sent to the renderer.
>
> I have also removed the code in ash_native_cursor_manager.cc
> that sets the mouse cursor location to the bogus value
> of (-10000,-10000) when mouse events are disabled; afaik
> this was originally added as a way to prevent unwanted
> hover effects in web contents but it does not work in all
> cases and causes other problems (see crbug.com/174358).
>
> BUG=153784,174358
> R=jamesr@chromium.org, kenrb@chromium.org, oshima@chromium.org, sky@chromium.org
>
> Review URL: https://codereview.chromium.org/14047015
TBR=tdanderson@google.com
Review URL: https://codereview.chromium.org/14975004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@198526 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm/ash_native_cursor_manager.cc')
-rw-r--r-- | ash/wm/ash_native_cursor_manager.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ash/wm/ash_native_cursor_manager.cc b/ash/wm/ash_native_cursor_manager.cc index dd72af1..be9c6b7 100644 --- a/ash/wm/ash_native_cursor_manager.cc +++ b/ash/wm/ash_native_cursor_manager.cc @@ -13,6 +13,10 @@ namespace { +// The coordinate of the cursor used when the mouse events are disabled. +const int kDisabledCursorLocationX = -10000; +const int kDisabledCursorLocationY = -10000; + void SetCursorOnAllRootWindows(gfx::NativeCursor cursor) { ash::Shell::RootWindowList root_windows = ash::Shell::GetInstance()->GetAllRootWindows(); @@ -95,6 +99,8 @@ void AshNativeCursorManager::SetMouseEventsEnabled( disabled_cursor_location_); } else { disabled_cursor_location_ = aura::Env::GetInstance()->last_mouse_location(); + aura::Env::GetInstance()->set_last_mouse_location( + gfx::Point(kDisabledCursorLocationX, kDisabledCursorLocationY)); } SetVisibility(delegate->GetCurrentVisibility(), delegate); |