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

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

Issue 1936823002: mus: Don't activate non-activatable widgets on Show() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « no previous file | ui/views/mus/native_widget_mus_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 45b07ff1e59a67e70d17e61f686552691452a5c2..752e62b6d2e3dcecbad3f3b023a236d9287d7b7c 100644
--- a/ui/views/mus/native_widget_mus.cc
+++ b/ui/views/mus/native_widget_mus.cc
@@ -709,9 +709,11 @@ void NativeWidgetMus::ShowWithWindowState(ui::WindowShowState state) {
window_tree_host_->Show();
GetNativeWindow()->Show();
- if (state != ui::SHOW_STATE_INACTIVE)
- Activate();
- GetWidget()->SetInitialFocus(state);
+ if (native_widget_delegate_->CanActivate()) {
+ if (state != ui::SHOW_STATE_INACTIVE)
+ Activate();
+ GetWidget()->SetInitialFocus(state);
+ }
}
bool NativeWidgetMus::IsVisible() const {
« no previous file with comments | « no previous file | ui/views/mus/native_widget_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698