[clutter-gtk] examples: Call realize()



commit ecc023b606c025a42fb476e09672048aa701a963
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Thu Jul 23 22:27:39 2015 +0100

    examples: Call realize()
    
    The way GtkStack manages its children is a bit peculiar. If we want to
    avoid crashing inside Clutter because of a weird state, we need to
    realize() the GtkClutterEmbed before getting the stage out of it.

 examples/gtk-clutter-test.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/examples/gtk-clutter-test.c b/examples/gtk-clutter-test.c
index 53792c7..f15c265 100644
--- a/examples/gtk-clutter-test.c
+++ b/examples/gtk-clutter-test.c
@@ -170,6 +170,7 @@ main (int argc, char *argv[])
 
   clutter = gtk_clutter_embed_new ();
   gtk_stack_add_named (GTK_STACK (stack), clutter, "clutter");
+  gtk_widget_realize (clutter);
 
   stage = gtk_clutter_embed_get_stage (GTK_CLUTTER_EMBED (clutter));
   clutter_actor_set_background_color (stage, CLUTTER_COLOR_LightSkyBlue);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]