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

Unified Diff: ui/views/widget/native_widget_aura.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: Address sky@'s comments Created 4 years, 10 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/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 85ab0aee9c0de3c74cd08d52dc8b9764d3a1a745..8c16994af4eb41f083a4347f02b8ad1186011328 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -489,7 +489,7 @@ void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) {
window_->SetProperty(aura::client::kShowStateKey, state);
}
window_->Show();
- if (delegate_->CanActivate()) {
+ if (delegate_->CanActivate() && wm::CanActivateWindow(window_)) {
sky 2016/03/03 20:22:47 I think this is the wrong place for the fix. If yo
xdai1 2016/03/03 22:01:31 You're right. Since the goal is to prevent SetInit
sky 2016/03/03 23:39:33 What is SetInitialFocus doing that is wrong? I thi
if (state != ui::SHOW_STATE_INACTIVE)
Activate();
// SetInitialFocus() should be always be called, even for

Powered by Google App Engine
This is Rietveld 408576698