[totem] backend: Don't try to paint 0-sized actors
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] backend: Don't try to paint 0-sized actors
- Date: Wed, 27 Jun 2012 14:36:51 +0000 (UTC)
commit 76f5de992b7fed65183d1e6d6dd03ed583014f53
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jun 27 15:13:47 2012 +0100
backend: Don't try to paint 0-sized actors
If the child will end up with one of the dimensions being zero,
don't bother trying to pain it.
src/backend/totem-aspect-frame.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/totem-aspect-frame.c b/src/backend/totem-aspect-frame.c
index af4eae2..346464b 100644
--- a/src/backend/totem-aspect-frame.c
+++ b/src/backend/totem-aspect-frame.c
@@ -155,6 +155,9 @@ totem_aspect_frame_allocate (ClutterActor *actor,
box_height = box->y2 - box->y1;
clutter_actor_get_preferred_size (child, NULL, NULL, &width, &height);
+ if (width <= 0.0f || height <= 0.0f)
+ return;
+
aspect = box_width / box_height;
child_aspect = width / height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]