[clutter] stage: Unset the natural size when fullscreening
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] stage: Unset the natural size when fullscreening
- Date: Tue, 10 Apr 2012 12:39:34 +0000 (UTC)
commit b12514ff9a8424bf4c97c1b0c4f608cbe2c5817b
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Tue Apr 10 12:12:50 2012 +0100
stage: Unset the natural size when fullscreening
This ensures that constraints and signal handlers will go through the
allocation and not through the cache after ::fullscreen has been
emitted.
clutter/clutter-stage.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c
index d2854ea..7ea13b5 100644
--- a/clutter/clutter-stage.c
+++ b/clutter/clutter-stage.c
@@ -897,6 +897,14 @@ clutter_stage_real_fullscreen (ClutterStage *stage)
box.x2 = geom.width;
box.y2 = geom.height;
+ /* we need to blow the caching on the Stage size, given that
+ * we're about to force an allocation, because if anything
+ * ends up querying the size of the stage during the allocate()
+ * call, like constraints or signal handlers, we'll get into an
+ * inconsistent state: the stage will report the old cached size,
+ * but the allocation will be updated anyway.
+ */
+ clutter_actor_set_size (CLUTTER_ACTOR (stage), -1.0, -1.0);
clutter_actor_allocate (CLUTTER_ACTOR (stage),
&box,
CLUTTER_ALLOCATION_NONE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]