window-actor: Don't connect to allocation-changed

This can cause allocation loops. Connect to size-changed to update the
shape instead.
This commit is contained in:
Jasper St. Pierre 2014-06-26 11:47:52 -04:00
parent 6c624e1c26
commit 6954d23444

View File

@ -76,7 +76,6 @@ struct _MetaWindowActorPrivate
gint64 frame_drawn_time;
guint repaint_scheduled_id;
guint allocation_changed_id;
/*
* These need to be counters rather than flags, since more plugins
@ -273,12 +272,11 @@ window_appears_focused_notify (MetaWindow *mw,
}
static void
surface_allocation_changed_notify (ClutterActor *actor,
const ClutterActorBox *allocation,
ClutterAllocationFlags flags,
MetaWindowActor *self)
window_size_changed (MetaWindow *mw,
gpointer data)
{
meta_window_actor_sync_actor_geometry (self, FALSE);
MetaWindowActor *self = META_WINDOW_ACTOR (data);
meta_window_actor_update_shape (self);
}
@ -371,8 +369,6 @@ set_surface (MetaWindowActor *self,
{
g_signal_handler_disconnect (priv->surface, priv->repaint_scheduled_id);
priv->repaint_scheduled_id = 0;
g_signal_handler_disconnect (priv->surface, priv->allocation_changed_id);
priv->allocation_changed_id = 0;
clutter_actor_remove_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
g_object_unref (priv->surface);
}
@ -384,8 +380,6 @@ set_surface (MetaWindowActor *self,
g_object_ref_sink (priv->surface);
priv->repaint_scheduled_id = g_signal_connect (priv->surface, "repaint-scheduled",
G_CALLBACK (surface_repaint_scheduled), self);
priv->allocation_changed_id = g_signal_connect (priv->surface, "allocation-changed",
G_CALLBACK (surface_allocation_changed_notify), self);
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
/* If the previous surface actor was frozen, start out
@ -495,6 +489,8 @@ meta_window_actor_set_property (GObject *object,
priv->window = g_value_dup_object (value);
g_signal_connect_object (priv->window, "notify::appears-focused",
G_CALLBACK (window_appears_focused_notify), self, 0);
g_signal_connect_object (priv->window, "size-changed",
G_CALLBACK (window_size_changed), self, 0);
break;
case PROP_NO_SHADOW:
{