aboutsummaryrefslogtreecommitdiff
path: root/generic/Group.c
diff options
context:
space:
mode:
authorlecoanet2002-12-20 13:54:07 +0000
committerlecoanet2002-12-20 13:54:07 +0000
commit48c4bba162de211db0d8cd021a55bca31d74dd35 (patch)
treed4d382a4eec2875ec63f929d2073d50923c77272 /generic/Group.c
parent5fc4ad987e7f0965eea40445053ffd35e8bccfa8 (diff)
downloadtkzinc-48c4bba162de211db0d8cd021a55bca31d74dd35.zip
tkzinc-48c4bba162de211db0d8cd021a55bca31d74dd35.tar.gz
tkzinc-48c4bba162de211db0d8cd021a55bca31d74dd35.tar.bz2
tkzinc-48c4bba162de211db0d8cd021a55bca31d74dd35.tar.xz
Correction d'un bug lors de l'utilisation d'un item de clip qui
ne g�n�re pas de surface donc pas de tristrip.
Diffstat (limited to 'generic/Group.c')
-rw-r--r--generic/Group.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/generic/Group.c b/generic/Group.c
index 9f117a3..3c061eb 100644
--- a/generic/Group.c
+++ b/generic/Group.c
@@ -487,7 +487,9 @@ PushClip(GroupItem group,
((((Item) group) != wi->top_group) || !wi->reshape)) {
simple = group->clip->class->GetClipVertices(group->clip, &tristrip);
/*printf("Group: PushClip group %d\n", ((Item) group)->id);*/
- ZnPushClip(wi, &tristrip, simple, set_gc);
+ if (tristrip.num_strips) {
+ ZnPushClip(wi, &tristrip, simple, set_gc);
+ }
}
}
@@ -616,6 +618,7 @@ CallRegularCC(Item item)
* Do some generic post-work in behalf of the (regular) children.
*/
#ifdef GLX
+#ifdef GL_LIST
/*
* Remove the item display list so that it will be recreated
* to reflect the changes.
@@ -625,6 +628,7 @@ CallRegularCC(Item item)
item->gl_list = 0;
}
#endif
+#endif
if (ISSET(item->inv_flags, ZN_REPICK_FLAG)) {
SET(wi->events_flags, INTERNAL_NEED_REPICK);
}
@@ -941,10 +945,11 @@ Draw(Item item)
PushTransform(item);
PushClip(group, True);
if (group->clip != ZN_NO_ITEM) {
- ZnCurrentClip(wi, NULL, &clip_box, NULL);
old_damaged_area = wi->damaged_area;
- IntersectBBox(&wi->damaged_area, clip_box, &bbox);
- wi->damaged_area = bbox;
+ if (ZnCurrentClip(wi, NULL, &clip_box, NULL)) {
+ IntersectBBox(&wi->damaged_area, clip_box, &bbox);
+ wi->damaged_area = bbox;
+ }
}
current_item = group->tail;
@@ -1022,10 +1027,11 @@ Render(Item item)
PushClip(group, True);
#ifdef GLX_DAMAGE
if (group->clip != ZN_NO_ITEM) {
- ZnCurrentClip(wi, NULL, &clip_box, NULL);
old_damaged_area = wi->damaged_area;
- IntersectBBox(&wi->damaged_area, clip_box, &bbox);
- wi->damaged_area = bbox;
+ if (ZnCurrentClip(wi, NULL, &clip_box, NULL)) {
+ IntersectBBox(&wi->damaged_area, clip_box, &bbox);
+ wi->damaged_area = bbox;
+ }
}
#endif