From d31bd6fe927dc5fd8a9c48695efc88d3e8ddabb5 Mon Sep 17 00:00:00 2001 From: Lionel Landwerlin Date: Tue, 24 Jan 2012 12:45:52 +0000 Subject: [PATCH] x11: adjust size to minimal size when realizing If you execute the following sequence : stage = clutter_stage_new (); clutter_actor_set_size (stage, 1280, 800); clutter_actor_realize (stage); Then you end up creating an onscreen buffer of size 1280x800 but ClutterStageX11 storing the stage size at 640x480. This patch resync the 2 implementation by using the ClutterStage's size in both classes when realizing. Signed-off-by: Lionel Landwerlin https://bugzilla.gnome.org/show_bug.cgi?id=667540 --- clutter/x11/clutter-stage-x11.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index 8dce848f7..cb07c16d5 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -435,6 +435,11 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) stage_cogl->onscreen = cogl_onscreen_new (backend->cogl_context, width, height); + /* We just created a window of the size of the actor. No need to fix + the size of the stage, just update it. */ + stage_x11->xwin_width = width; + stage_x11->xwin_height = height; + if (stage_x11->xwin != None) { cogl_x11_onscreen_set_foreign_window_xid (stage_cogl->onscreen, @@ -500,7 +505,6 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) stage_cogl->wrapper, event_flags); - /* no user resize.. */ clutter_stage_x11_fix_window_size (stage_x11, stage_x11->xwin_width, stage_x11->xwin_height);