[stage] Set default size correctly
authorChris Lord <chris@linux.intel.com>
Sun, 7 Feb 2010 13:18:14 +0000 (14:18 +0100)
committerChris Lord <chris@linux.intel.com>
Sun, 7 Feb 2010 13:18:14 +0000 (14:18 +0100)
Due to the way the new sizing works, clutter stage must set its size in
init (to maintain old behaviour) and the properties on the X11 stage
must be initialised to 1x1 so that it actually goes ahead with the
resize.

Fixes stages that aren't user resizable and have no size set from
appearing at 1x1.

clutter/clutter-stage.c
clutter/x11/clutter-stage-x11.c

index 9e6baa8..f3b0b89 100644 (file)
@@ -1196,6 +1196,9 @@ clutter_stage_init (ClutterStage *self)
   clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE);
   clutter_stage_set_title (self, g_get_prgname ());
   clutter_stage_set_key_focus (self, NULL);
+
+  /* Set the default size */
+  clutter_actor_set_size (CLUTTER_ACTOR (self), 640, 480);
 }
 
 /**
index 754dcc2..d4dad70 100644 (file)
@@ -657,8 +657,8 @@ static void
 clutter_stage_x11_init (ClutterStageX11 *stage)
 {
   stage->xwin = None;
-  stage->xwin_width = 640;
-  stage->xwin_height = 480;
+  stage->xwin_width = 1;
+  stage->xwin_height = 1;
 
   stage->wm_state = STAGE_X11_WITHDRAWN;