[mutter/wayland] window-actor: Use g_signal_connect_object
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wayland] window-actor: Use g_signal_connect_object
- Date: Mon, 9 Dec 2013 19:04:43 +0000 (UTC)
commit 1b600f5867ed6fc06a21dcef35831242ca6d0314
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Dec 9 13:47:01 2013 -0500
window-actor: Use g_signal_connect_object
To make our signal connections a bit more manageable...
src/compositor/meta-window-actor.c | 16 ++--------------
1 files changed, 2 insertions(+), 14 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 325ec21..309193b 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -54,8 +54,6 @@ struct _MetaWindowActorPrivate
MetaSurfaceActor *surface;
- guint surface_allocation_changed_id;
-
/* MetaShadowFactory only caches shadows that are actually in use;
* to avoid unnecessary recomputation we do two things: 1) we store
* both a focused and unfocused shadow for the window. If the window
@@ -300,8 +298,6 @@ meta_window_actor_init (MetaWindowActor *self)
priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
META_TYPE_WINDOW_ACTOR,
MetaWindowActorPrivate);
-
- priv->surface_allocation_changed_id = 0;
priv->opacity = 0xff;
priv->shadow_class = NULL;
}
@@ -415,11 +411,8 @@ meta_window_actor_constructed (GObject *object)
clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
- priv->surface_allocation_changed_id =
- g_signal_connect (CLUTTER_ACTOR (priv->surface),
- "allocation-changed",
- G_CALLBACK (surface_allocation_changed_notify),
- self);
+ g_signal_connect_object (priv->surface, "allocation-changed",
+ G_CALLBACK (surface_allocation_changed_notify), self, 0);
meta_window_actor_update_shape (self);
g_signal_connect_object (window, "notify::decorated",
@@ -495,11 +488,6 @@ meta_window_actor_dispose (GObject *object)
g_clear_object (&priv->window);
- if (priv->surface != NULL && priv->surface_allocation_changed_id != 0)
- g_signal_handler_disconnect (priv->surface,
- priv->surface_allocation_changed_id);
- priv->surface_allocation_changed_id = 0;
-
/*
* Release the extra reference we took on the actor.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]