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

Unified Diff: ash/mus/root_window_controller.cc

Issue 2503623002: Support creation of toplevel mus::Windows on separate displays (Closed)
Patch Set: Clean up/format code. 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
Index: ash/mus/root_window_controller.cc
diff --git a/ash/mus/root_window_controller.cc b/ash/mus/root_window_controller.cc
index 4279731f0df65714c0b6267737bf9c288226dab0..2e0c6d2a728fce25f34d46360ff2ac587be36a47 100644
--- a/ash/mus/root_window_controller.cc
+++ b/ash/mus/root_window_controller.cc
@@ -103,8 +103,11 @@ ui::Window* RootWindowController::NewTopLevelWindow(
container_window = GetWindowByShellWindowId(container_id)->mus_window();
} else {
// TODO(sky): window->bounds() isn't quite right.
mfomitchev 2016/11/17 17:14:01 Remove this now?
thanhph 2016/11/17 19:08:30 Done.
+ gfx::Rect* screen_bound = wm_root_window_controller_->ConvertWindowToScreen(
+ WmWindowMus::Get(window), window);
+
container_window = WmWindowMus::GetMusWindow(wm::GetDefaultParent(
- WmWindowMus::Get(root_), WmWindowMus::Get(window), window->bounds()));
+ WmWindowMus::Get(root_), WmWindowMus::Get(window), (*screen_bound)));
}
DCHECK(WmWindowMus::Get(container_window)->IsContainer());
@@ -114,9 +117,7 @@ ui::Window* RootWindowController::NewTopLevelWindow(
} else {
container_window->AddChild(window);
}
-
window_count_++;
-
return window;
}

Powered by Google App Engine
This is Rietveld 408576698