diff options
Diffstat (limited to 'generic/Item.c')
-rw-r--r-- | generic/Item.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/generic/Item.c b/generic/Item.c index 6739e0e..a9fec0b 100644 --- a/generic/Item.c +++ b/generic/Item.c @@ -1804,12 +1804,17 @@ ConfigureItem(ZnItem item, } } - if (previous_visible && ISCLEAR(item->flags, ZN_VISIBLE_BIT)) { - /* - * Special case when the item has its visibility - * just turned out. - */ - ZnDamage(wi, &item->item_bounding_box); + // + // If visibility changed. + if (previous_visible ^ ISSET(item->flags, ZN_VISIBLE_BIT)) { + // First must force an update of the parent geometry (bbox). + Invalidate(item, ZN_COORDS_FLAG); + // + // Special case when the item has its visibility + // just turned out. + if (ISCLEAR(item->flags, ZN_VISIBLE_BIT)) { + ZnDamage(wi, &item->item_bounding_box); + } } Invalidate(item, flags); |