[mutter/wip/mult-window-actors: 785/785] 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: 785/785] window-actor: Don't do any special initialization in _new
- Date: Fri, 6 Dec 2013 20:30:42 +0000 (UTC)
commit a6d59d7ddedc0d24f4cb795b49fd8c237bdd4eff
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Dec 6 01:00:13 2013 -0500
window-actor: Don't do any special initialization in _new
https://bugzilla.gnome.org/show_bug.cgi?id=678989
src/compositor/meta-window-actor.c | 52 ++++++++++++++---------------------
1 files changed, 21 insertions(+), 31 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 745a0a5..98a130d 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -42,6 +42,7 @@ enum {
static guint signals[LAST_SIGNAL] = {0};
+static void meta_window_actor_queue_create_pixmap (MetaWindowActor *self);
struct _MetaWindowActorPrivate
{
@@ -272,6 +273,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
@@ -366,10 +370,26 @@ meta_window_actor_constructed (GObject *object)
}
meta_window_actor_update_opacity (self);
+ meta_window_actor_sync_actor_position (self);
+
+ priv->mapped = meta_window_toplevel_is_mapped (priv->window);
+ if (priv->mapped)
+ meta_window_actor_queue_create_pixmap (self);
+
+ meta_window_actor_set_updates_frozen (self,
+ meta_window_updates_are_frozen (priv->window));
+
+ /* If a window doesn't start off with updates frozen, we should
+ * we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn.
+ */
+ if (priv->window->extended_sync_request_counter && !priv->updates_frozen)
+ meta_window_actor_queue_frame_drawn (self, FALSE);
/* Start off with an empty region to maintain the invariant that
the shape region is always set */
priv->shape_region = cairo_region_create ();
+
+ G_OBJECT_CLASS (meta_window_actor_parent_class)->constructed (object);
}
static void
@@ -1540,39 +1560,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_set_updates_frozen (self,
- meta_window_updates_are_frozen (priv->window));
-
- /* If a window doesn't start off with updates frozen, we should
- * we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn.
- */
- if (priv->window->extended_sync_request_counter && !priv->updates_frozen)
- meta_window_actor_queue_frame_drawn (self, FALSE);
-
- meta_window_actor_sync_actor_geometry (self, priv->window->placed);
-
- /* Initial position in the stack is arbitrary; stacking will be synced
- * before we first paint.
- */
- info->windows = g_list_append (info->windows, self);
-
- return self;
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]