diff options
author | Lionel Landwerlin <llandwerlin@gmail.com> | 2012-01-09 11:58:33 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2012-02-15 11:36:27 +0000 |
commit | 6f2c14c958fcca29c166b4deab71ffdbfe2c2ba5 (patch) | |
tree | 60e81ee4df44675a4200fcbedab7b6048c089451 | |
parent | 0eaa8976db3d200ae31360c3c05422c45563b944 (diff) | |
download | clutter-6f2c14c958fcca29c166b4deab71ffdbfe2c2ba5.tar.gz |
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 when ClutterStageCogl 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 <llandwerlin@gmail.com>
https://bugzilla.gnome.org/show_bug.cgi?id=667540
-rw-r--r-- | clutter/x11/clutter-stage-x11.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index ab877b906..457cf9ddb 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -411,6 +411,9 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) ClutterBackendX11 *backend_x11 = stage_x11->backend; ClutterDeviceManager *device_manager; int event_flags; + gfloat width = stage_x11->xwin_width; + gfloat height = stage_x11->xwin_height; + if (clutter_stages_by_xid == NULL) clutter_stages_by_xid = g_hash_table_new (NULL, NULL); @@ -460,6 +463,10 @@ clutter_stage_x11_realize (ClutterStageWindow *stage_window) event_flags); /* no user resize.. */ + clutter_actor_get_size (CLUTTER_ACTOR (stage_x11->wrapper), &width, &height); + stage_x11->xwin_width = width; + stage_x11->xwin_height = height; + clutter_stage_x11_fix_window_size (stage_x11, stage_x11->xwin_width, stage_x11->xwin_height); |