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

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: Modify the test to use NativeWidgetAura when initializing widget. 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
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 3effd1b4d9e86dde9fdbc75fd2e1441a6fcbd77c..220e4c6f1b0e81d6ebeae54b6c659b74eb4dc741 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_.get())
focus_manager_->SetStoredFocusView(v);
return true;
}
« no previous file with comments | « ui/views/widget/native_widget_aura_unittest.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698