| Index: services/ui/ws/window_tree.cc
|
| diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
|
| index 4b469fdf923f84635a2278edf90df9d0ae5dcfed..2f829d343e494b0fcdb326d862bdd1adf87ebba4 100644
|
| --- a/services/ui/ws/window_tree.cc
|
| +++ b/services/ui/ws/window_tree.cc
|
| @@ -1014,15 +1014,21 @@ mojom::WindowDataPtr WindowTree::WindowToWindowData(
|
| const ServerWindow* window) {
|
| DCHECK(IsWindowKnown(window));
|
| const ServerWindow* parent = window->parent();
|
| - // If the parent isn't known, it means the parent is not visible to us (not
|
| - // in roots), and should not be sent over.
|
| - if (parent && !IsWindowKnown(parent))
|
| + const ServerWindow* transient_parent = window->transient_parent();
|
| + // If the parent or transient parent isn't known, it means it is not visible
|
| + // to the client and should not be sent over.
|
| + if (!IsWindowKnown(parent))
|
| parent = nullptr;
|
| + if (!IsWindowKnown(transient_parent))
|
| + transient_parent = nullptr;
|
| mojom::WindowDataPtr window_data(mojom::WindowData::New());
|
| window_data->parent_id =
|
| parent ? ClientWindowIdForWindow(parent).id : ClientWindowId().id;
|
| window_data->window_id =
|
| window ? ClientWindowIdForWindow(window).id : ClientWindowId().id;
|
| + window_data->transient_parent_id =
|
| + transient_parent ? ClientWindowIdForWindow(transient_parent).id
|
| + : ClientWindowId().id;
|
| window_data->bounds = window->bounds();
|
| window_data->properties = mojo::MapToUnorderedMap(window->properties());
|
| window_data->visible = window->visible();
|
|
|