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

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: merge 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 | « 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 6392a86607fd1dc801b2ce42a83e44447bf7e0cc..4a01f63d9292b8c844a323fbaf85e7f49df5a1db 100644
--- a/ui/aura/mus/window_tree_client.cc
+++ b/ui/aura/mus/window_tree_client.cc
@@ -361,6 +361,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()),
+ true);
+ }
+ SetWindowBoundsFromServer(WindowMus::Get(window_tree_host->window()),
+ window_data->bounds);
}
return window_tree_host;
}
@@ -456,7 +462,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) {
@@ -467,7 +473,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