Chromium Code Reviews| Index: components/exo/shell_surface.cc |
| diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc |
| index 0f0c8a65bdda247291e03b7cdd5f4d8991ffff57..f83d7ad00c9c1c0762e79d2b2c18e8f31366de74 100644 |
| --- a/components/exo/shell_surface.cc |
| +++ b/components/exo/shell_surface.cc |
| @@ -887,8 +887,9 @@ void ShellSurface::CreateShellSurfaceWidget(ui::WindowShowState show_state) { |
| params.shadow_type = views::Widget::InitParams::SHADOW_TYPE_NONE; |
| params.opacity = views::Widget::InitParams::TRANSLUCENT_WINDOW; |
| params.show_state = show_state; |
| - params.parent = |
| - ash::Shell::GetContainer(ash::Shell::GetPrimaryRootWindow(), container_); |
| + // Make shell surface a transient child if |parent_| has been set. |
| + params.parent = parent_ ? parent_ : |
|
reveman
2016/07/29 18:27:07
Pretty sure this will break xdg shell modal dialog
oshima
2016/07/29 20:35:58
That's still not right. Let's discuss offline.
Dominik Laskowski
2016/07/29 20:37:09
Unless |params.child| is true, Widget::Init makes
|
| + ash::Shell::GetContainer(ash::Shell::GetTargetRootWindow(), container_); |
| params.bounds = initial_bounds_; |
| bool activatable = activatable_; |
| // ShellSurfaces in system modal container are only activatable if input |
| @@ -924,10 +925,6 @@ void ShellSurface::CreateShellSurfaceWidget(ui::WindowShowState show_state) { |
| widget_->set_movement_disabled(!initial_bounds_.IsEmpty()); |
| window_state->set_ignore_keyboard_bounds_change(!initial_bounds_.IsEmpty()); |
| - // Make shell surface a transient child if |parent_| has been set. |
| - if (parent_) |
| - wm::AddTransientChild(parent_, window); |
| - |
| // Allow Ash to manage the position of a top-level shell surfaces if show |
| // state is one that allows auto positioning and |initial_bounds_| has |
| // not been set. |