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

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

Issue 2840043003: chromeos: Makes mushrome use simplified display management (Closed)
Patch Set: make virtual terminal work Created 3 years, 8 months 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: services/ui/ws/window_server.cc
diff --git a/services/ui/ws/window_server.cc b/services/ui/ws/window_server.cc
index d012b886dc2f0bc50ecc2246398ff6bcdc5aef36..2a5278215fe494f197705aeea8c52e8fb298a2b5 100644
--- a/services/ui/ws/window_server.cc
+++ b/services/ui/ws/window_server.cc
@@ -826,7 +826,13 @@ void WindowServer::OnSurfaceCreated(const cc::SurfaceInfo& surface_info) {
window_paint_callback_.Run(window);
auto* display = display_manager_->GetDisplayContaining(window);
- if (display && window == display->GetActiveRootWindow()) {
+ WindowManagerDisplayRoot* display_root =
+ display ? display->GetActiveWindowManagerDisplayRoot() : nullptr;
+ if (display_root && (window == display_root->root() ||
kylechar 2017/04/26 16:41:44 Can you pull some of this conditional out into oth
sky 2017/04/26 19:36:42 Done.
+ (!display_root->window_manager_state()
+ ->window_tree()
+ ->automatically_create_display_roots() &&
+ window->parent() == display_root->root()))) {
// A new surface for a WindowManager root has been created. This is a
// special case because ServerWindows created by the WindowServer are not
// part of a WindowTree. Send the SurfaceId directly to FrameGenerator and

Powered by Google App Engine
This is Rietveld 408576698