From 48c4bba162de211db0d8cd021a55bca31d74dd35 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Fri, 20 Dec 2002 13:54:07 +0000 Subject: 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. --- generic/Group.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'generic/Group.c') 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 -- cgit v1.1