Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Unified Diff: services/window_manager/focus_controller.cc

Issue 805123003: Adds capture to the mojo window_manager. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Cleanup Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698