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

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: nit 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
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 84fd935db5feb4c255c76eef18383aee1766eb7a..2d4da35990791b21ccd898d432ddedd33864924f 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -1113,11 +1113,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() {

Powered by Google App Engine
This is Rietveld 408576698