From df6e7aee73a3c3818acab8218732659eb77a3cdc Mon Sep 17 00:00:00 2001 From: Chris Lord Date: Tue, 16 Feb 2010 17:46:52 +0000 Subject: [PATCH] [stage-x11] Set the geometry size for foreign wins If we get into the resize function and it's a foreign window, set the geometry size so that the allocate will set the backend size and call glViewport. --- clutter/x11/clutter-stage-x11.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index 231546c3f..729e73649 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -200,6 +200,13 @@ clutter_stage_x11_resize (ClutterStageWindow *stage_window, ClutterStage *stage = stage_x11->wrapper; gboolean resize; + if (stage_x11->is_foreign_xwin) + { + stage_x11->xwin_width = width; + stage_x11->xwin_height = height; + return; + } + /* If we're going fullscreen, don't mess with the size */ if (stage_x11->fullscreening) return; @@ -221,7 +228,7 @@ clutter_stage_x11_resize (ClutterStageWindow *stage_window, CLUTTER_NOTE (BACKEND, "New size received: (%d, %d)", width, height); - if (stage_x11->xwin != None && !stage_x11->is_foreign_xwin) + if (stage_x11->xwin != None) { clutter_stage_x11_fix_window_size (stage_x11, width, height);