* the change to support B_DRAW_ON_CHILDREN broke ViewLayer::ViewAt(), ie
mouse events would not be passed to the correct children of views with B_DRAW_ON_CHILDREN flag set -> fixed. (fixes #1673) git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23300 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
89740c7897
commit
826ea6b6f1
@ -340,14 +340,27 @@ ViewLayer::ViewAt(const BPoint& where, BRegion* windowContentClipping)
|
||||
if (!fVisible)
|
||||
return NULL;
|
||||
|
||||
if (ScreenClipping(windowContentClipping).Contains(where))
|
||||
return this;
|
||||
// NOTE: if this view can draw on children, it's screen clipping
|
||||
// excludes these children, so we need to ask those first if they
|
||||
// contain "where", otherwise we check the screen clipping before
|
||||
// recursing into the children
|
||||
|
||||
if (!(fFlags & B_DRAW_ON_CHILDREN)) {
|
||||
if (ScreenClipping(windowContentClipping).Contains(where))
|
||||
return this;
|
||||
}
|
||||
|
||||
for (ViewLayer* child = FirstChild(); child; child = child->NextSibling()) {
|
||||
ViewLayer* layer = child->ViewAt(where, windowContentClipping);
|
||||
if (layer)
|
||||
return layer;
|
||||
}
|
||||
|
||||
if (fFlags & B_DRAW_ON_CHILDREN) {
|
||||
if (ScreenClipping(windowContentClipping).Contains(where))
|
||||
return this;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user