summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ash/wm/capture_controller.cc9
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;
}