diff options
-rw-r--r-- | generic/Group.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/generic/Group.c b/generic/Group.c index 509bd6f..5b5505e 100644 --- a/generic/Group.c +++ b/generic/Group.c @@ -1185,6 +1185,7 @@ Pick(ZnItem item, ZnBBox bbox, inter, *clip_box; ZnPoint *p = ps->point; ZnBool atomic; + TkRegion reg; ps->a_item= ZN_NO_ITEM; ps->a_part = ZN_NO_PART; @@ -1232,13 +1233,25 @@ Pick(ZnItem item, bbox.corner.x = p->x + (aperture?aperture:1); bbox.corner.y = p->y + (aperture?aperture:1); - if (ZnCurrentClip(wi, NULL, &clip_box, NULL)) { + if (ZnCurrentClip(wi, ®, &clip_box, NULL)) { ZnIntersectBBox(&bbox, clip_box, &inter); if (ZnIsEmptyBBox(&inter)) { goto out; } + if (reg && !ZnPointInRegion(reg, p->x, p->y)) { + goto out; + } } - + + if (group->clip) { + PushTransform(group->clip); + dist = group->clip->class->Pick(group->clip, ps); + PopTransform(group->clip); + if (dist > 0.0) { + goto out; + } + } + current_item = (ps->start_item == ZN_NO_ITEM) ? group->head : ps->start_item; atomic = ISSET(item->flags, ATOMIC_BIT) && !ps->override_atomic; |