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

Unified Diff: ui/views/mus/native_widget_mus.cc

Issue 2371113003: Do not give instant focus if a view's toplevelwidget is not active (Closed)
Patch Set: based on comments Created 4 years, 2 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/focus/focus_manager.cc ('k') | ui/views/view_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/native_widget_mus.cc
diff --git a/ui/views/mus/native_widget_mus.cc b/ui/views/mus/native_widget_mus.cc
index 9bfd9a5a90565ce1948a3ad462171ab01b83bebd..44e1291fcd5b25c78d862353f75926233c545b1f 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -1115,11 +1115,11 @@ bool NativeWidgetMus::IsVisible() const {
}
void NativeWidgetMus::Activate() {
+ if (!window_)
+ return;
+
static_cast<aura::client::ActivationClient*>(focus_client_.get())
->ActivateWindow(content_);
- // FocusControllerMus should have focused |window_| when |content_| is
- // activated.
- DCHECK(!window_ || window_->HasFocus());
}
void NativeWidgetMus::Deactivate() {
« no previous file with comments | « ui/views/focus/focus_manager.cc ('k') | ui/views/view_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698