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

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

Issue 2696873002: Change OnWindowInputEvent to use display_id to find the host and update event root_location in WS. (Closed)
Patch Set: nits Created 3 years, 9 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 | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/window_tree.cc
diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc
index 89ef41112b3c944243ac3b9822f10b336d9e6656..033b929a08a57240a012926e30fc7a3bcc154c5d 100644
--- a/services/ui/ws/window_tree.cc
+++ b/services/ui/ws/window_tree.cc
@@ -157,6 +157,14 @@ bool WindowTree::HasRoot(const ServerWindow* window) const {
return roots_.count(window) > 0;
}
+const ServerWindow* WindowTree::FindRootFor(const ServerWindow* window) const {
+ for (const ServerWindow* parent = window; parent; parent = parent->parent()) {
+ if (roots_.count(parent))
+ return parent;
+ }
+ return nullptr;
+}
+
const ServerWindow* WindowTree::GetWindowByClientId(
const ClientWindowId& id) const {
auto iter = client_id_to_window_id_map_.find(id);
« no previous file with comments | « services/ui/ws/window_tree.h ('k') | services/ui/ws/window_tree_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698