diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-01-12 04:18:20 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-01-12 04:18:20 +0000 |
commit | 5e7705c2c39ec3893d6ea64b7471a31dfe1f462f (patch) | |
tree | 8b5a46285b6446f0ecb80f87dd0e2fad0dd8b613 /guilib/GUIControlGroup.cpp | |
parent | e74a5b93900c8779b9a88c105b3571d9ef5b33fc (diff) |
fixed: Don't pass position-adjusted coordinates to the group's mouse handler - <hitrect> is in terms of the parent's coords.
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@26709 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/GUIControlGroup.cpp')
-rw-r--r-- | guilib/GUIControlGroup.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guilib/GUIControlGroup.cpp b/guilib/GUIControlGroup.cpp index cc7af7e574..9399c6d85a 100644 --- a/guilib/GUIControlGroup.cpp +++ b/guilib/GUIControlGroup.cpp @@ -362,15 +362,15 @@ bool CGUIControlGroup::SendMouseEvent(const CPoint &point, const CMouseEvent &ev // transform our position into child coordinates CPoint childPoint(point); m_transform.InverseTransformPosition(childPoint.x, childPoint.y); - childPoint -= GetPosition(); if (CGUIControl::CanFocus()) { + CPoint pos(GetPosition()); // run through our controls in reverse order (so that last rendered is checked first) for (rControls i = m_children.rbegin(); i != m_children.rend(); ++i) { CGUIControl *child = *i; - if (child->SendMouseEvent(childPoint, event)) + if (child->SendMouseEvent(childPoint - pos, event)) { // we've handled the action, and/or have focused an item return true; } |