Chromium Code Reviews| Index: services/ui/ws/window_tree.cc |
| diff --git a/services/ui/ws/window_tree.cc b/services/ui/ws/window_tree.cc |
| index ce6c4a6ea32c1c4c890e4aca53bc3315951d4468..bef21e28b352bf8b7bd46a7ad97267d33ea686f0 100644 |
| --- a/services/ui/ws/window_tree.cc |
| +++ b/services/ui/ws/window_tree.cc |
| @@ -1938,16 +1938,12 @@ void WindowTree::ActivateNextWindow() { |
| (*displays.begin())->ActivateNextWindow(); |
| } |
| -void WindowTree::SetUnderlaySurfaceOffsetAndExtendedHitArea( |
| - Id window_id, |
| - int32_t x_offset, |
| - int32_t y_offset, |
| - const gfx::Insets& hit_area) { |
| +void WindowTree::SetExtendedHitArea(Id window_id, const gfx::Insets& hit_area) { |
| ServerWindow* window = GetWindowByClientId(ClientWindowId(window_id)); |
| - if (!window) |
| + // Extended hit test region should only be set by the owner of the window. |
| + if (!window || window->id().client_id != id_) |
|
mfomitchev
2017/02/14 18:27:12
Would it be useful to log an error if window->id()
sky
2017/02/14 18:32:41
Done.
|
| return; |
| - window->SetUnderlayOffset(gfx::Vector2d(x_offset, y_offset)); |
| window->set_extended_hit_test_region(hit_area); |
| } |