[stage] Set default size correctly

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.
This commit is contained in:
Chris Lord 2010-02-07 14:18:14 +01:00
parent 8083dc418b
commit b968defae9
2 changed files with 5 additions and 2 deletions

View 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);
}
/**

View 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;