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

Unified Diff: mash/wm/root_window_controller.cc

Issue 1907153002: mash/wm: Fix detecting container windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 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
« no previous file with comments | « mash/wm/disconnected_app_handler.cc ('k') | mash/wm/window_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/root_window_controller.cc
diff --git a/mash/wm/root_window_controller.cc b/mash/wm/root_window_controller.cc
index 53356d480888f6b1c5434e08ca7fab8f9a6e353f..4d953fd54e2bcc228f37eb7dec14281d6f736e16 100644
--- a/mash/wm/root_window_controller.cc
+++ b/mash/wm/root_window_controller.cc
@@ -73,7 +73,9 @@ mus::Window* RootWindowController::GetWindowForContainer(
}
bool RootWindowController::WindowIsContainer(const mus::Window* window) const {
- return window && window->parent() == root_;
+ return window &&
+ window->local_id() > ContainerToLocalId(mojom::Container::ROOT) &&
+ window->local_id() < ContainerToLocalId(mojom::Container::COUNT);
}
mus::WindowManagerClient* RootWindowController::window_manager_client() {
« no previous file with comments | « mash/wm/disconnected_app_handler.cc ('k') | mash/wm/window_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698