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

Unified Diff: ui/aura/window_targeter.cc

Issue 180253006: Merge 252257 "events: Fix event-targeting for transformed windows." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1847/src/
Patch Set: Created 6 years, 10 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 | « ash/wm/overview/window_selector_unittest.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/window_targeter.cc
===================================================================
--- ui/aura/window_targeter.cc (revision 253296)
+++ ui/aura/window_targeter.cc (working copy)
@@ -37,10 +37,10 @@
bool WindowTargeter::EventLocationInsideBounds(
aura::Window* window, const ui::LocatedEvent& event) const {
- gfx::RectF bounds = window->bounds();
- if (window->layer())
- window->layer()->transform().TransformRect(&bounds);
- return bounds.Contains(event.location());
+ gfx::Point point = event.location();
+ if (window->parent())
+ aura::Window::ConvertPointToTarget(window->parent(), window, &point);
+ return gfx::Rect(window->bounds().size()).Contains(point);
}
ui::EventTarget* WindowTargeter::FindTargetForEvent(ui::EventTarget* root,
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | ui/aura/window_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698