From 54f4ed775c72387acd6959f5c68453846a90dd68 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 21 Jan 2009 12:47:29 +0000 Subject: [PATCH] Set the SYNC_MATRICES flag when a stage is first realized The stage will usually be painted before the first ConfigureNotify arrives so we need to set the SYNC_MATRICES flag to ensure that the viewport will be correct for that paint. Unfortunately this means that the viewport will be set again once the ConfigureNotify is received but compared to rendering an initial invalid scene I think it is the lesser of two evils. --- clutter/clutter-stage.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 07c5e4976..3e38fe637 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -258,6 +258,11 @@ clutter_stage_realize (ClutterActor *self) CLUTTER_ACTOR_SET_FLAGS (self, CLUTTER_ACTOR_REALIZED); + /* Make sure the viewport and projection matrix are valid for the + first paint (which will likely occur before the ConfigureNotify + is received) */ + CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_ACTOR_SYNC_MATRICES); + g_assert (priv->impl != NULL); CLUTTER_ACTOR_GET_CLASS (priv->impl)->realize (priv->impl);