diff options
author | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 21:11:58 +0000 |
---|---|---|
committer | varunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-29 21:11:58 +0000 |
commit | 9aac60c3262bd4ca4278cf983b4b681057c668a6 (patch) | |
tree | c752bafc1eaf2ac13cf44f86f1018f1da49ac3ab /ash/wm | |
parent | cff176a476e0a9d9f0154d679a497fe21ed8b9ca (diff) | |
download | chromium_src-9aac60c3262bd4ca4278cf983b4b681057c668a6.zip chromium_src-9aac60c3262bd4ca4278cf983b4b681057c668a6.tar.gz chromium_src-9aac60c3262bd4ca4278cf983b4b681057c668a6.tar.bz2 |
aura (gr): Transfer events to new consumer *before* changing the capture window.
Otherwise, the cancel events generated by the transfer go to the wrong window.
BUG=134486
TEST=none
Review URL: https://chromiumcodereview.appspot.com/10690034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@144991 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/wm')
-rw-r--r-- | ash/wm/capture_controller.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ash/wm/capture_controller.cc b/ash/wm/capture_controller.cc index e000ab8..7a91d2f 100644 --- a/ash/wm/capture_controller.cc +++ b/ash/wm/capture_controller.cc @@ -32,7 +32,6 @@ void CaptureController::SetCapture(aura::Window* new_capture_window) { DCHECK(!capture_window_ || capture_window_->GetRootWindow()); aura::Window* old_capture_window = capture_window_; - capture_window_ = new_capture_window; Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); for (Shell::RootWindowList::iterator iter = root_windows.begin(); @@ -40,8 +39,16 @@ void CaptureController::SetCapture(aura::Window* new_capture_window) { aura::RootWindow* root_window = *iter; root_window->gesture_recognizer()-> TransferEventsTo(old_capture_window, new_capture_window); + } + + capture_window_ = new_capture_window; + + for (Shell::RootWindowList::iterator iter = root_windows.begin(); + iter != root_windows.end(); ++iter) { + aura::RootWindow* root_window = *iter; root_window->UpdateCapture(old_capture_window, new_capture_window); } + return; } |