Ensure that the viewport is updated when resizing
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 12 Jan 2009 11:22:15 +0000 (11:22 +0000)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 12 Jan 2009 11:22:15 +0000 (11:22 +0000)
When we resize the embedded stage we need to make sure that the
GL viewport is updated as well.

clutter-gtk/gtk-clutter-embed.c

index 44c339f..87374e5 100644 (file)
@@ -195,11 +195,14 @@ gtk_clutter_embed_size_allocate (GtkWidget     *widget,
       gtk_clutter_embed_send_configure (GTK_CLUTTER_EMBED (widget));
     }
 
+  /* change the size of the stage and ensure that the viewport
+   * has been updated as well
+   */
   clutter_actor_set_size (priv->stage,
                           allocation->width,
                           allocation->height);
 
-  clutter_actor_queue_relayout (priv->stage);
+  clutter_stage_ensure_viewport (CLUTTER_STAGE (priv->stage));
 }
 
 static gboolean