[clutter/clutter-1.8] x11: adjust size to minimal size when realizing



commit 6f2c14c958fcca29c166b4deab71ffdbfe2c2ba5
Author: Lionel Landwerlin <llandwerlin gmail com>
Date:   Mon Jan 9 11:58:33 2012 +0000

    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

 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 ab877b9..457cf9d 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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]