summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2015-07-23 22:27:39 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2015-07-23 22:27:39 +0100
commitecc023b606c025a42fb476e09672048aa701a963 (patch)
treec9c06df06f6262516cb4e2d8c0680fb7ca30e988
parent21f84d77dd5637a3e8d71e0a686241d49520a6e6 (diff)
downloadclutter-gtk-ecc023b606c025a42fb476e09672048aa701a963.tar.gz
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.
-rw-r--r--examples/gtk-clutter-test.c1
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);