Commit 50d8a713 authored by Daniel Nicoara's avatar Daniel Nicoara Committed by Commit Bot

cast: Fix TODO around root window in CastWindowManagerAura

aura::Window defines the root window as the window that has a
WindowTreeHost associated with it. Since this gets the window from
WindowTreeHost, it is getting the root window. Calling GetRootWindow()
on the root window will return the same window.

Bug: None
Test: Ran cast_graphics_unittests
Change-Id: If2ec69710fa94e6f0ac44342f51ea89e47c414bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2248158Reviewed-by: default avatarSean Topping <seantopping@chromium.org>
Commit-Queue: Daniel Nicoara <dnicoara@chromium.org>
Cr-Commit-Position: refs/heads/master@{#778927}
parent 0d7ccb0c
......@@ -213,21 +213,19 @@ void CastWindowManagerAura::Setup() {
window_tree_host_ = std::make_unique<CastWindowTreeHostAura>(
enable_input_, std::move(properties));
window_tree_host_->InitHost();
aura::Window* tree_window = window_tree_host_->window();
tree_window->SetLayoutManager(new CastLayoutManager(this, tree_window));
aura::Window* root_window = window_tree_host_->window();
root_window->SetLayoutManager(new CastLayoutManager(this, root_window));
window_tree_host_->SetRootTransform(GetPrimaryDisplayRotationTransform());
// Allow seeing through to the hardware video plane:
window_tree_host_->compositor()->SetBackgroundColor(SK_ColorTRANSPARENT);
focus_client_ = std::make_unique<CastFocusClientAura>();
aura::client::SetFocusClient(tree_window, focus_client_.get());
wm::SetActivationClient(tree_window, focus_client_.get());
aura::client::SetWindowParentingClient(tree_window, this);
capture_client_.reset(new aura::client::DefaultCaptureClient(tree_window));
aura::client::SetFocusClient(root_window, focus_client_.get());
wm::SetActivationClient(root_window, focus_client_.get());
aura::client::SetWindowParentingClient(root_window, this);
capture_client_.reset(new aura::client::DefaultCaptureClient(root_window));
// TODO(seantopping): Is |root_window| different from |tree_window|?
aura::Window* root_window = tree_window->GetRootWindow();
screen_position_client_ =
std::make_unique<wm::DefaultScreenPositionClient>(root_window);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment