[clutter/clutter-1.6] paint-volume: Zero-sized actors don't have paint volume
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter/clutter-1.6] paint-volume: Zero-sized actors don't have paint volume
- Date: Fri, 1 Apr 2011 13:54:58 +0000 (UTC)
commit fc25e79f898f40637a0c97e9ef74d41b36323f39
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Fri Apr 1 11:43:34 2011 +0100
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.
(cherry picked from commit 524eb23eb76456055061c0188451aa90cd26aaaa)
Signed-off-by: Emmanuele Bassi <ebassi linux intel com>
clutter/clutter-paint-volume.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-paint-volume.c b/clutter/clutter-paint-volume.c
index cd7a4e7..3127f61 100644
--- a/clutter/clutter-paint-volume.c
+++ b/clutter/clutter-paint-volume.c
@@ -849,6 +849,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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]