From b968defae92f3fbd5a4a762b4c817ab58989ee82 Mon Sep 17 00:00:00 2001 From: Chris Lord Date: Sun, 7 Feb 2010 14:18:14 +0100 Subject: [PATCH] [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. --- clutter/clutter-stage.c | 3 +++ clutter/x11/clutter-stage-x11.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index 9e6baa8..f3b0b89 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -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); } /** diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index 754dcc2..d4dad70 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -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; -- 2.7.4