diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-07-21 11:30:33 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2010-07-21 11:50:08 +0100 |
commit | 7ad37b97d7cef1a9bc4ec4378eddf0a131ba3533 (patch) | |
tree | b45f63196bf008fc8d0aa2e19768a712049b5756 /clutter-gtk | |
parent | ded1c5b9d1272d9b03b79fc6742e2b7c1dc49832 (diff) | |
download | clutter-gtk-7ad37b97d7cef1a9bc4ec4378eddf0a131ba3533.tar.gz |
actor: Avoid layout cycles/1
Disable synchronizing the size of the ClutterX11TexturePixmap from the
underlying CoglTexture, since we're doing it inside an allocation
sequence anyway.
This requires setting the initial size of the actor when we set the
GdkPixmap the first time.
Diffstat (limited to 'clutter-gtk')
-rw-r--r-- | clutter-gtk/gtk-clutter-actor.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clutter-gtk/gtk-clutter-actor.c b/clutter-gtk/gtk-clutter-actor.c index e24067f..e4719db 100644 --- a/clutter-gtk/gtk-clutter-actor.c +++ b/clutter-gtk/gtk-clutter-actor.c @@ -105,6 +105,7 @@ gtk_clutter_actor_realize (ClutterActor *actor) GtkClutterActorPrivate *priv = clutter->priv; ClutterActor *stage; GtkWidget *new_embed; + gint pixmap_width, pixmap_height; new_embed = NULL; stage = clutter_actor_get_stage (actor); @@ -115,9 +116,11 @@ gtk_clutter_actor_realize (ClutterActor *actor) priv->pixmap = gdk_offscreen_window_get_pixmap (gtk_widget_get_window (priv->widget)); g_object_ref (priv->pixmap); gdk_drawable_set_colormap (priv->pixmap, gtk_widget_get_colormap (priv->embed)); + gdk_drawable_get_size (priv->pixmap, &pixmap_width, &pixmap_height); clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->texture), GDK_PIXMAP_XID (priv->pixmap)); + clutter_actor_set_size (priv->texture, pixmap_width, pixmap_height); } static void |