Chromium Code Reviews| Index: ui/wm/core/transient_window_manager.cc |
| diff --git a/ui/wm/core/transient_window_manager.cc b/ui/wm/core/transient_window_manager.cc |
| index 2ca145d2420dbdd9f9a2fc81fd785e8e64d7a495..dff5bdf046479b5e7d151fa4ce6150ceccead6ad 100644 |
| --- a/ui/wm/core/transient_window_manager.cc |
| +++ b/ui/wm/core/transient_window_manager.cc |
| @@ -162,8 +162,14 @@ void TransientWindowManager::OnWindowVisibilityChanged(Window* window, |
| // If the window has transient children, updates the transient children's |
| // visiblity as well. |
| - for (Window* child : transient_children_) |
| - Get(child)->UpdateTransientChildVisibility(visible); |
| + Windows transient_children = transient_children_; |
| + for (Window* child : transient_children) { |
| + // Child window can be removed inside UpdateTransientChildVisibility call. |
|
sky
2015/11/20 15:56:57
Your description says some of the children can be
oshima
2015/11/20 18:39:18
Sorry if I'm missing something, but the window lif
sky
2015/11/20 18:53:44
The copy of the windows (transient_children) is re
oshima
2015/11/20 19:07:26
If a new window is created at the same address, it
|
| + if (std::find(transient_children_.begin(), transient_children_.end(), |
| + child) != transient_children_.end()) { |
| + Get(child)->UpdateTransientChildVisibility(visible); |
| + } |
|
sadrul
2015/11/21 08:42:43
Maybe this could use a WindowTracker? e.g.
Wind
|
| + } |
| // Remember the show request in |show_on_parent_visible_| and hide it again |
| // if the following conditions are met |