Chromium Code Reviews| Index: services/window_manager/focus_controller.cc |
| diff --git a/services/window_manager/focus_controller.cc b/services/window_manager/focus_controller.cc |
| index ba6454acc66f6d2b0ee047713b9b701e42a9ef44..e316f5603284ffc22617d58135972a617f75f999 100644 |
| --- a/services/window_manager/focus_controller.cc |
| +++ b/services/window_manager/focus_controller.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/auto_reset.h" |
| #include "mojo/services/view_manager/public/cpp/view_property.h" |
| #include "mojo/services/view_manager/public/cpp/view_tracker.h" |
| +#include "services/window_manager/capture_controller.h" |
| #include "services/window_manager/focus_controller_observer.h" |
| #include "services/window_manager/focus_rules.h" |
| #include "services/window_manager/view_target.h" |
| @@ -74,8 +75,10 @@ void FocusController::FocusView(View* view) { |
| return; |
| } |
| - // TODO(erg): We need to early abort in the of a view having |
| - // capture. However, we currently don't have a capture client here. |
| + // We should not be messing with the focus if the window has capture, unless |
| + // no view has focus. |
| + if (view && (GetCaptureView(view) == view) && focused_view_) |
|
sky
2014/12/16 03:44:20
This was was recently nuked from chrome: https://c
|
| + return; |
| // Focusing a window also activates its containing activatable window. Note |
| // that the rules could redirect activation activation and/or focus. |