osx: Added size initialization for stage

After stage creation it's size can be changed by user and it should be
taken into account in clutter_stage_osx_realize.
This commit is contained in:
Roman Kudiyarov 2010-07-21 23:22:57 +07:00 committed by Robert Bragg
parent 5218da748f
commit 411b5a09bb

View File

@ -263,7 +263,17 @@ clutter_stage_osx_realize (ClutterStageWindow *stage_window)
CLUTTER_OSX_POOL_ALLOC();
backend_osx = CLUTTER_BACKEND_OSX (self->backend);
/* Call get_size - this will either get the geometry size (which
* before we create the window is set to 640x480), or if a size
* is set, it will get that. This lets you set a size on the
* stage before it's realized.
*/
gfloat width, height;
clutter_actor_get_size (CLUTTER_ACTOR (self->wrapper),
&width,
&height);
self->requisition_width = width;
self->requisition_height= height;
NSRect rect = NSMakeRect(0, 0, self->requisition_width, self->requisition_height);
self->view = [[ClutterGLView alloc]