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

Unified Diff: ui/views/corewm/focus_controller.cc

Issue 23892006: Allows focus to change when capture held (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months 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
« no previous file with comments | « no previous file | ui/views/corewm/focus_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/focus_controller.cc
diff --git a/ui/views/corewm/focus_controller.cc b/ui/views/corewm/focus_controller.cc
index fc9c3136dfa0102b1cabb117d9853ae57997f7aa..f985ff455791dd147db8e43ea017af5be2121f99 100644
--- a/ui/views/corewm/focus_controller.cc
+++ b/ui/views/corewm/focus_controller.cc
@@ -130,9 +130,12 @@ void FocusController::FocusWindow(aura::Window* window) {
return;
}
- // We should not be messing with the focus if the window has capture.
- if (window && (aura::client::GetCaptureWindow(window) == window))
+ // We should not be messing with the focus if the window has capture, unless
+ // no has focus.
+ if (window && (aura::client::GetCaptureWindow(window) == window) &&
+ focused_window_) {
return;
+ }
// Focusing a window also activates its containing activatable window. Note
// that the rules could redirect activation activation and/or focus.
« no previous file with comments | « no previous file | ui/views/corewm/focus_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698