| 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;
|
| }
|
|
|