diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-07 18:12:14 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-02-07 18:12:14 +0000 |
commit | 4e1feeb6a6bebfcb368c67421c1334bc04d76d6c (patch) | |
tree | 77df86bbcb183ec1d813a76c51ae018bf19802d3 /ui | |
parent | 7ae754a87ddf9c29a0b9e1e0201a0d173835de47 (diff) | |
download | chromium_src-4e1feeb6a6bebfcb368c67421c1334bc04d76d6c.zip chromium_src-4e1feeb6a6bebfcb368c67421c1334bc04d76d6c.tar.gz chromium_src-4e1feeb6a6bebfcb368c67421c1334bc04d76d6c.tar.bz2 |
linux_aura: Don't update cursor while shutting down the move loop.
During a drag and drop, we use a nested message loop and post a task to
signal termination of the drag. However, there might be more XdndStatus
messages in queue between the mouse release event and the posted
QuitClosure, so don't try to grab the cursor after we've already
released the cursor grab since that will persist past the end of the
move loop.
BUG=none
R=sadrul@chromium.org, varkha@chromium.org
Review URL: https://codereview.chromium.org/156183002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249724 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r-- | ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc index 865706a..f384faf 100644 --- a/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc +++ b/ui/views/widget/desktop_aura/x11_whole_screen_move_loop.cc @@ -129,8 +129,12 @@ bool X11WholeScreenMoveLoop::RunMoveLoop(aura::Window* source, } void X11WholeScreenMoveLoop::UpdateCursor(gfx::NativeCursor cursor) { - DCHECK(in_move_loop_); - GrabPointerWithCursor(cursor); + if (in_move_loop_) { + // If we're still in the move loop, regrab the pointer with the updated + // cursor. Note: we can be called from handling an XdndStatus message after + // EndMoveLoop() was called, but before we return from the nested RunLoop. + GrabPointerWithCursor(cursor); + } } void X11WholeScreenMoveLoop::EndMoveLoop() { |