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

Unified Diff: components/mus/ws/window_finder.cc

Issue 1991973003: mash: Preliminary support for widget hit test masks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 | « components/mus/ws/server_window.cc ('k') | components/mus/ws/window_finder_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/window_finder.cc
diff --git a/components/mus/ws/window_finder.cc b/components/mus/ws/window_finder.cc
index 116b52cfd8db820a50e4ed5ba97cd91fb82b6821..466bd5a6a8ea1256bd9871b4568cd6483a93756e 100644
--- a/components/mus/ws/window_finder.cc
+++ b/components/mus/ws/window_finder.cc
@@ -39,12 +39,17 @@ ServerWindow* FindDeepestVisibleWindowForEvents(ServerWindow* window,
-child->extended_hit_test_region().top(),
-child->extended_hit_test_region().right(),
-child->extended_hit_test_region().bottom());
- if (child_bounds.Contains(child_location)) {
- *location = child_location;
- ServerWindow* result = FindDeepestVisibleWindowForEvents(child, location);
- if (IsValidWindowForEvents(result))
- return result;
- }
+ if (!child_bounds.Contains(child_location))
+ continue;
+
+ if (child->hit_test_mask() &&
+ !child->hit_test_mask()->Contains(child_location))
+ continue;
+
+ *location = child_location;
+ ServerWindow* result = FindDeepestVisibleWindowForEvents(child, location);
+ if (IsValidWindowForEvents(result))
+ return result;
}
return window;
}
« no previous file with comments | « components/mus/ws/server_window.cc ('k') | components/mus/ws/window_finder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698