2008-04-01 Neil Roberts <neil@o-hand.com>
authorNeil Roberts <neil@openedhand.com>
Tue, 1 Apr 2008 16:01:16 +0000 (16:01 +0000)
committerNeil Roberts <neil@openedhand.com>
Tue, 1 Apr 2008 16:01:16 +0000 (16:01 +0000)
* examples/gtk-clutter-test.c (main): Moved the
clutter_actor_show_all call to after the parent widget is
shown. Otherwise all of the actors get unrealized when
clutter_x11_set_stage_foreign is called and nothing is displayed.

ChangeLog
examples/gtk-clutter-test.c

index f4349dc..19f3abd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-04-01  Neil Roberts  <neil@o-hand.com>
+
+       * examples/gtk-clutter-test.c (main): Moved the
+       clutter_actor_show_all call to after the parent widget is
+       shown. Otherwise all of the actors get unrealized when
+       clutter_x11_set_stage_foreign is called and nothing is displayed.
+
 2008-04-01  Matthew Allum  <mallum@openedhand.com>
 
        * clutter-gtk/gtk-clutter-embed.c:
index 173d4e9..ecd05ad 100644 (file)
@@ -198,9 +198,6 @@ main (int argc, char *argv[])
   /* Add the group to the stage */
   clutter_group_add (CLUTTER_GROUP (stage), CLUTTER_ACTOR(oh->group));
 
-  /* Show our group, widget show will show the stage */
-  clutter_actor_show_all (CLUTTER_ACTOR (oh->group));
-
   g_signal_connect (stage, "button-press-event",
                    G_CALLBACK (input_cb), 
                    oh);
@@ -210,6 +207,12 @@ main (int argc, char *argv[])
 
   gtk_widget_show_all (window);
 
+  /* Only show the actors after parent show otherwise it will just be
+   * unrealized when the clutter foreign window is set. widget_show
+   * will call show on the stage.
+   */
+  clutter_actor_show_all (CLUTTER_ACTOR (oh->group));
+
   /* Create a timeline to manage animation */
   timeline = clutter_timeline_new (360, 60); /* num frames, fps */
   g_object_set(timeline, "loop", TRUE, NULL);   /* have it loop */