diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 18:27:15 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-31 18:27:15 +0000 |
commit | 8cb17328afd9062a2016d5c00306f8e0d27f41ea (patch) | |
tree | 4cd23b361f8cc95d8f505f4911178dd0568dd89b /ui/aura/root_window.h | |
parent | 678d9e7f80e0484882195759b49765499777d6a0 (diff) | |
download | chromium_src-8cb17328afd9062a2016d5c00306f8e0d27f41ea.zip chromium_src-8cb17328afd9062a2016d5c00306f8e0d27f41ea.tar.gz chromium_src-8cb17328afd9062a2016d5c00306f8e0d27f41ea.tar.bz2 |
Ensure on Windows AURA that the cursor stays within the bounds of the window during a LockMouse operation and
is unclipped during the UnlockMouse operation.
On Windows we can ensure that the cursor stays within the bounds of a window via the ClipCursor API.
Changes in this CL are as below:-
1. The cursor is clipped in the RootWindowHost::ConfineCursorToRootWindow abstraction and is unclipped in the
RootWindowHost::UnConfineCursor abstraction. Currently these functions are only implemented on Windows in
the DesktopRootWindowHostWin class.
2. Added an accessor method UnConfineCursor to the RootWindow class which forwards this call to the RootWindowHost.
This is on the same lines as the ConfineCursorToWindow method in the RootWindow class.
3. We need to explicitly hide the cursor on Windows via the ShowCursor API. This is done in the
DesktopRootWindowHostWin::OnCursorVisibilityChanged function.
4. If we receive non client messages in the RenderWidgetHostViewAura class in the locked mouse state, we should move
the cursor to the center and return. If we don't do this then it causes DCHECKs to fire in the webkit mouse event
conversion code. In any case non client messages should not be sent to webkit.
Fixes bug https://code.google.com/p/chromium/issues/detail?id=305563
BUG=305563
R=scheib@chromium.org, sky@chromium.org
Review URL: https://codereview.chromium.org/49383004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@232176 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/root_window.h')
-rw-r--r-- | ui/aura/root_window.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ui/aura/root_window.h b/ui/aura/root_window.h index a96e9bf..8428bd8 100644 --- a/ui/aura/root_window.h +++ b/ui/aura/root_window.h @@ -136,6 +136,9 @@ class AURA_EXPORT RootWindow : public Window, // Clips the cursor movement to the root_window. bool ConfineCursorToWindow(); + // Restores the cursor movement beyond the root window. + void UnConfineCursor(); + // Draw the damage_rect. void ScheduleRedrawRect(const gfx::Rect& damage_rect); |