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

Unified Diff: ui/aura/mus/window_tree_client.cc

Issue 2535983004: Makes sure bounds and visibilty are updated correctly for new displays (Closed)
Patch Set: Created 4 years, 1 month 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 | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_client.cc
diff --git a/ui/aura/mus/window_tree_client.cc b/ui/aura/mus/window_tree_client.cc
index 14c7d48da4af8d452c6d35c131bdc942ff96c630..4495021a3fe78499935f3f0b196fd6410c120d92 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -375,6 +375,12 @@ std::unique_ptr<WindowTreeHostMus> WindowTreeClient::CreateWindowTreeHost(
if (!window_data.is_null()) {
SetLocalPropertiesFromServerProperties(
WindowMus::Get(window_tree_host->window()), window_data);
+ if (window_data->visible) {
+ SetWindowVisibleFromServer(WindowMus::Get(window_tree_host->window()),
+ window_data->visible);
+ SetWindowBoundsFromServer(WindowMus::Get(window_tree_host->window()),
+ window_data->bounds);
sadrul 2016/11/29 23:29:28 Should this set bounds regardless of visibility?
sky 2016/11/29 23:35:00 Good catch! done.
+ }
}
return window_tree_host;
}
@@ -470,7 +476,7 @@ void WindowTreeClient::OnEmbedImpl(ui::mojom::WindowTree* window_tree,
delegate_->OnEmbed(std::move(window_tree_host));
}
-WindowTreeHost* WindowTreeClient::WmNewDisplayAddedImpl(
+WindowTreeHostMus* WindowTreeClient::WmNewDisplayAddedImpl(
const display::Display& display,
ui::mojom::WindowDataPtr root_data,
bool parent_drawn) {
@@ -479,7 +485,7 @@ WindowTreeHost* WindowTreeClient::WmNewDisplayAddedImpl(
std::unique_ptr<WindowTreeHostMus> window_tree_host =
CreateWindowTreeHost(WindowMusType::DISPLAY, root_data, display.id());
- WindowTreeHost* window_tree_host_ptr = window_tree_host.get();
+ WindowTreeHostMus* window_tree_host_ptr = window_tree_host.get();
window_manager_delegate_->OnWmNewDisplay(std::move(window_tree_host),
display);
return window_tree_host_ptr;
« no previous file with comments | « ui/aura/mus/window_tree_client.h ('k') | ui/aura/mus/window_tree_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698