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

Unified Diff: services/ui/ws/window_tree.cc

Issue 2557353003: Changes OnWindowHierarchyChanged() to include transient parent (Closed)
Patch Set: fix Created 4 years 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 | « services/ui/ws/window_manager_client_unittest.cc ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « services/ui/ws/window_manager_client_unittest.cc ('k') | ui/aura/mus/window_tree_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698