summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2011-04-01 11:43:34 +0100
committerEmmanuele Bassi <ebassi@linux.intel.com>2011-04-01 11:43:34 +0100
commit524eb23eb76456055061c0188451aa90cd26aaaa (patch)
tree9294344dd9ced546930e38e176f442b4730de55e
parent7e6bf1612b686f42ec82666ddb91b2d6ca7dbb0c (diff)
downloadclutter-524eb23eb76456055061c0188451aa90cd26aaaa.tar.gz
paint-volume: Zero-sized actors don't have paint volume
If an actor has an allocated dimension equal to 0 then it has no paint volume.
-rw-r--r--clutter/clutter-paint-volume.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/clutter/clutter-paint-volume.c b/clutter/clutter-paint-volume.c
index 35edf2482..1b480578d 100644
--- a/clutter/clutter-paint-volume.c
+++ b/clutter/clutter-paint-volume.c
@@ -855,6 +855,10 @@ _clutter_actor_set_default_paint_volume (ClutterActor *self,
clutter_actor_get_allocation_geometry (self, &geometry);
+ /* a zero-sized actor has no paint volume */
+ if (geometry.width == 0 || geometry.height == 0)
+ return FALSE;
+
clutter_paint_volume_set_width (volume, geometry.width);
clutter_paint_volume_set_height (volume, geometry.height);