From f9f03894a691cfb8f791f34c684d82f8a6d5b5b8 Mon Sep 17 00:00:00 2001 From: Chris Lord Date: Tue, 16 Feb 2010 18:17:55 +0000 Subject: [PATCH] [stage-x11] Fix resizing for foreign windows As well as manually setting the geometry size, we needed to queue a relayout. This is what the ConfigureNotify handler would normally do, but we don't get this event when using a foreign window (obviously). This should fix resizing in things like gtk-clutter. --- clutter/x11/clutter-stage-x11.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index 729e73649..1c9f53668 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -202,8 +202,13 @@ clutter_stage_x11_resize (ClutterStageWindow *stage_window, if (stage_x11->is_foreign_xwin) { + /* If this is a foreign window we won't get a ConfigureNotify, + * so we need to manually set the size and queue a relayout on the + * stage here (as is normally done in response to ConfigureNotify). + */ stage_x11->xwin_width = width; stage_x11->xwin_height = height; + clutter_actor_queue_relayout (stage_x11->wrapper); return; }