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

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

Issue 2649103009: chromeos: wires transients using the WindowTreeHost window (Closed)
Patch Set: Created 3 years, 11 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/desktop_window_tree_host_mus_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/desktop_window_tree_host_mus.cc
diff --git a/ui/views/mus/desktop_window_tree_host_mus.cc b/ui/views/mus/desktop_window_tree_host_mus.cc
index 3dc3c368fceae94bfc548359e6ab2c908d0c8b89..9cff6ce99ca63f8bbdb57d97e12ceb2b82202b7f 100644
--- a/ui/views/mus/desktop_window_tree_host_mus.cc
+++ b/ui/views/mus/desktop_window_tree_host_mus.cc
@@ -272,9 +272,12 @@ void DesktopWindowTreeHostMus::Init(aura::Window* content_window,
aura::client::SetCursorClient(window(), cursor_manager_.get());
InitHost();
- if (params.parent) {
- aura::client::GetTransientWindowClient()->AddTransientChild(params.parent,
- window());
+ // Transient parents are connected using the Window created by WindowTreeHost,
+ // which is owned by the window manager. This way the window manager can
+ // properly identify and honor transients.
+ if (params.parent && params.parent->GetHost()) {
+ aura::client::GetTransientWindowClient()->AddTransientChild(
+ params.parent->GetHost()->window(), window());
}
}
« no previous file with comments | « no previous file | ui/views/mus/desktop_window_tree_host_mus_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698