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

Unified Diff: ui/views/widget/widget.cc

Issue 1753473003: A window should not get activated or get input focus if it's behind the lock screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix the failed try jobs Created 4 years, 9 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
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 3effd1b4d9e86dde9fdbc75fd2e1441a6fcbd77c..d40a19d2155caf712d40e58e7204b948cbe5d6d0 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -1317,7 +1317,7 @@ bool Widget::SetInitialFocus(ui::WindowShowState show_state) {
show_state == ui::SHOW_STATE_MINIMIZED) {
// If not focusing the window now, tell the focus manager which view to
// focus when the window is restored.
- if (v)
+ if (v && focus_manager_)
xdai1 2016/03/08 18:30:17 focus_manager_ is null for non top level windows.
sky 2016/03/08 22:42:04 A null focus_manager_ wasn't possible before, so i
xdai1 2016/03/10 01:12:57 According to the comment in https://code.google.co
focus_manager_->SetStoredFocusView(v);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698