[mutter/wip/mult-window-actors: 7/7] window-actor: Don't do any special initialization in _new
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/mult-window-actors: 7/7] window-actor: Don't do any special initialization in _new
- Date: Wed, 27 Jun 2012 16:22:43 +0000 (UTC)
commit cd0053c6ac611f8847a7f5b33bdb137cbea0b47c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Apr 23 18:51:03 2012 -0400
window-actor: Don't do any special initialization in _new
src/compositor/meta-window-actor.c | 30 ++++++++++++------------------
1 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index f1e7cb0..6913b09 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -36,6 +36,7 @@ enum {
static guint signals[LAST_SIGNAL] = {0};
+static void meta_window_actor_queue_create_pixmap (MetaWindowActor *self);
struct _MetaWindowActorPrivate
{
@@ -227,6 +228,9 @@ meta_window_actor_init (MetaWindowActor *self)
MetaWindowActorPrivate);
priv->opacity = 0xff;
priv->shadow_class = NULL;
+
+ priv->last_width = -1;
+ priv->last_height = -1;
}
static void
@@ -327,7 +331,7 @@ meta_window_actor_constructed (GObject *object)
else
{
/*
- * This is the case where existing window is gaining/loosing frame.
+ * This is the case where existing window is gaining/losing frame.
* Just ensure the actor is top most (i.e., above shadow).
*/
clutter_actor_set_child_above_sibling (CLUTTER_ACTOR (self), priv->actor, NULL);
@@ -336,6 +340,12 @@ meta_window_actor_constructed (GObject *object)
meta_window_actor_update_opacity (self);
meta_window_actor_update_shape (self);
+ priv->mapped = meta_window_toplevel_is_mapped (priv->window);
+ if (priv->mapped)
+ meta_window_actor_queue_create_pixmap (self);
+
+ meta_window_actor_sync_actor_position (self);
+
G_OBJECT_CLASS (meta_window_actor_parent_class)->constructed(object);
}
@@ -1408,25 +1418,9 @@ meta_window_actor_unmaximize (MetaWindowActor *self,
MetaWindowActor *
meta_window_actor_new (MetaWindow *window)
{
- MetaWindowActor *self;
- MetaWindowActorPrivate *priv;
-
- self = g_object_new (META_TYPE_WINDOW_ACTOR,
+ return g_object_new (META_TYPE_WINDOW_ACTOR,
"meta-window", window,
NULL);
-
- priv = self->priv;
-
- priv->last_width = -1;
- priv->last_height = -1;
-
- priv->mapped = meta_window_toplevel_is_mapped (priv->window);
- if (priv->mapped)
- meta_window_actor_queue_create_pixmap (self);
-
- meta_window_actor_sync_actor_position (self);
-
- return self;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]