[mutter/wip/nielsdg/more-declarable-types: 73/73] Meta: use G_DECLARE_DERIVABLE/FINAL_TYPE



commit cb6a4e73ae335f0c96dc46e75627194be7fb4441
Author: Niels De Graef <Niels DeGraef barco com>
Date:   Wed Oct 31 11:47:17 2018 +0100

    Meta: use G_DECLARE_DERIVABLE/FINAL_TYPE
    
    * Clears up a lot of boilerplate
    * We get g_autoptr support for free

 src/backends/meta-barrier-private.h          |  21 +-
 src/backends/meta-cursor-tracker-private.h   |   4 -
 src/backends/native/meta-barrier-native.c    |  95 ++---
 src/backends/native/meta-barrier-native.h    |  26 +-
 src/backends/x11/meta-barrier-x11.c          |  39 +-
 src/backends/x11/meta-barrier-x11.h          |  27 +-
 src/compositor/meta-background-actor.c       | 261 ++++++------
 src/compositor/meta-background-group.c       |   5 +
 src/compositor/meta-background-image.c       |  22 +-
 src/compositor/meta-background.c             | 203 ++++------
 src/compositor/meta-cullable.h               |  11 +-
 src/compositor/meta-dnd-actor-private.h      |  26 +-
 src/compositor/meta-dnd-actor.c              |  32 +-
 src/compositor/meta-feedback-actor-private.h |  19 +-
 src/compositor/meta-feedback-actor.c         |   6 +-
 src/compositor/meta-shadow-factory.c         |  10 +-
 src/compositor/meta-shaped-texture.c         | 386 ++++++++----------
 src/compositor/meta-surface-actor-wayland.c  |  50 +--
 src/compositor/meta-surface-actor-wayland.h  |  26 +-
 src/compositor/meta-surface-actor-x11.c      | 149 +++----
 src/compositor/meta-surface-actor-x11.h      |  26 +-
 src/compositor/meta-surface-actor.c          |  57 ++-
 src/compositor/meta-surface-actor.h          |  24 +-
 src/compositor/meta-window-actor.c           | 579 ++++++++++++---------------
 src/meta/meta-background-actor.h             |  29 +-
 src/meta/meta-background-group.h             |  31 +-
 src/meta/meta-background-image.h             |  43 +-
 src/meta/meta-background.h                   |  29 +-
 src/meta/meta-cursor-tracker.h               |  14 +-
 src/meta/meta-shadow-factory.h               |  23 +-
 src/meta/meta-shaped-texture.h               |  48 +--
 src/meta/meta-window-actor.h                 |  32 +-
 src/meta/meta-window-group.h                 |   5 +-
 src/meta/meta-workspace-manager.h            |   5 +-
 34 files changed, 949 insertions(+), 1414 deletions(-)
---
diff --git a/src/backends/meta-barrier-private.h b/src/backends/meta-barrier-private.h
index e5022ef16..d0483e43c 100644
--- a/src/backends/meta-barrier-private.h
+++ b/src/backends/meta-barrier-private.h
@@ -31,20 +31,11 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_BARRIER_IMPL            (meta_barrier_impl_get_type ())
-#define META_BARRIER_IMPL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BARRIER_IMPL, 
MetaBarrierImpl))
-#define META_BARRIER_IMPL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_BARRIER_IMPL, 
MetaBarrierImplClass))
-#define META_IS_BARRIER_IMPL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BARRIER_IMPL))
-#define META_IS_BARRIER_IMPL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  META_TYPE_BARRIER_IMPL))
-#define META_BARRIER_IMPL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  META_TYPE_BARRIER_IMPL, 
MetaBarrierImplClass))
-
-typedef struct _MetaBarrierImpl        MetaBarrierImpl;
-typedef struct _MetaBarrierImplClass   MetaBarrierImplClass;
-
-struct _MetaBarrierImpl
-{
-  GObject parent;
-};
+#define META_TYPE_BARRIER_IMPL (meta_barrier_impl_get_type ())
+G_DECLARE_DERIVABLE_TYPE (MetaBarrierImpl,
+                          meta_barrier_impl,
+                          META, BARRIER_IMPL,
+                          GObject)
 
 struct _MetaBarrierImplClass
 {
@@ -56,8 +47,6 @@ struct _MetaBarrierImplClass
   void (*destroy) (MetaBarrierImpl *barrier);
 };
 
-GType meta_barrier_impl_get_type (void) G_GNUC_CONST;
-
 void _meta_barrier_emit_hit_signal (MetaBarrier      *barrier,
                                     MetaBarrierEvent *event);
 void _meta_barrier_emit_left_signal (MetaBarrier      *barrier,
diff --git a/src/backends/meta-cursor-tracker-private.h b/src/backends/meta-cursor-tracker-private.h
index 95ff6d740..29ee94044 100644
--- a/src/backends/meta-cursor-tracker-private.h
+++ b/src/backends/meta-cursor-tracker-private.h
@@ -49,10 +49,6 @@ struct _MetaCursorTracker {
   MetaCursorSpriteXfixes *xfixes_cursor;
 };
 
-struct _MetaCursorTrackerClass {
-  GObjectClass parent_class;
-};
-
 gboolean meta_cursor_tracker_handle_xevent (MetaCursorTracker *tracker,
                                            XEvent            *xevent);
 
diff --git a/src/backends/native/meta-barrier-native.c b/src/backends/native/meta-barrier-native.c
index d335cbc17..b030921f9 100644
--- a/src/backends/native/meta-barrier-native.c
+++ b/src/backends/native/meta-barrier-native.c
@@ -65,8 +65,10 @@ typedef enum {
   META_BARRIER_STATE_LEFT,
 } MetaBarrierState;
 
-struct _MetaBarrierImplNativePrivate
+struct _MetaBarrierImplNative
 {
+  MetaBarrierImpl parent;
+
   MetaBarrier              *barrier;
   MetaBarrierManagerNative *manager;
 
@@ -77,8 +79,9 @@ struct _MetaBarrierImplNativePrivate
   MetaBarrierDirection      blocked_dir;
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (MetaBarrierImplNative, meta_barrier_impl_native,
-                            META_TYPE_BARRIER_IMPL)
+G_DEFINE_TYPE (MetaBarrierImplNative,
+               meta_barrier_impl_native,
+               META_TYPE_BARRIER_IMPL)
 
 static int
 next_serial (void)
@@ -111,10 +114,7 @@ is_barrier_blocking_directions (MetaBarrier         *barrier,
 static void
 dismiss_pointer (MetaBarrierImplNative *self)
 {
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
-
-  priv->state = META_BARRIER_STATE_LEFT;
+  self->state = META_BARRIER_STATE_LEFT;
 }
 
 /*
@@ -164,13 +164,11 @@ maybe_release_barrier (gpointer key,
                        gpointer user_data)
 {
   MetaBarrierImplNative *self = key;
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
-  MetaBarrier *barrier = priv->barrier;
+  MetaBarrier *barrier = self->barrier;
   MetaLine2 *motion = user_data;
   MetaLine2 hit_box;
 
-  if (priv->state != META_BARRIER_STATE_HELD)
+  if (self->state != META_BARRIER_STATE_HELD)
     return;
 
   /* Release if we end up outside barrier end points. */
@@ -250,9 +248,7 @@ update_closest_barrier (gpointer key,
                         gpointer user_data)
 {
   MetaBarrierImplNative *self = key;
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
-  MetaBarrier *barrier = priv->barrier;
+  MetaBarrier *barrier = self->barrier;
   MetaClosestBarrierData *data = user_data;
   MetaVector2 intersection;
   float dx, dy;
@@ -263,12 +259,12 @@ update_closest_barrier (gpointer key,
     return;
 
   /* Ignore if the barrier released the pointer. */
-  if (priv->state == META_BARRIER_STATE_RELEASE)
+  if (self->state == META_BARRIER_STATE_RELEASE)
     return;
 
   /* Ignore if we are moving away from barrier. */
-  if (priv->state == META_BARRIER_STATE_HELD &&
-      (data->in.directions & priv->blocked_dir) == 0)
+  if (self->state == META_BARRIER_STATE_HELD &&
+      (data->in.directions & self->blocked_dir) == 0)
     return;
 
   /* Check if the motion intersects with the barrier, and retrieve the
@@ -354,27 +350,25 @@ emit_barrier_event (MetaBarrierImplNative *self,
                     float                  dx,
                     float                  dy)
 {
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
-  MetaBarrier *barrier = priv->barrier;
+  MetaBarrier *barrier = self->barrier;
   MetaBarrierEvent *event = g_slice_new0 (MetaBarrierEvent);
-  MetaBarrierState old_state = priv->state;
+  MetaBarrierState old_state = self->state;
 
-  switch (priv->state)
+  switch (self->state)
     {
     case META_BARRIER_STATE_HIT:
-      priv->state = META_BARRIER_STATE_HELD;
-      priv->trigger_serial = next_serial ();
+      self->state = META_BARRIER_STATE_HELD;
+      self->trigger_serial = next_serial ();
       event->dt = 0;
 
       break;
     case META_BARRIER_STATE_RELEASE:
     case META_BARRIER_STATE_LEFT:
-      priv->state = META_BARRIER_STATE_ACTIVE;
+      self->state = META_BARRIER_STATE_ACTIVE;
 
       /* Intentional fall-through. */
     case META_BARRIER_STATE_HELD:
-      event->dt = time - priv->last_event_time;
+      event->dt = time - self->last_event_time;
 
       break;
     case META_BARRIER_STATE_ACTIVE:
@@ -382,7 +376,7 @@ emit_barrier_event (MetaBarrierImplNative *self,
     }
 
   event->ref_count = 1;
-  event->event_id = priv->trigger_serial;
+  event->event_id = self->trigger_serial;
   event->time = time;
 
   event->x = x;
@@ -390,12 +384,12 @@ emit_barrier_event (MetaBarrierImplNative *self,
   event->dx = dx;
   event->dy = dy;
 
-  event->grabbed = priv->state == META_BARRIER_STATE_HELD;
+  event->grabbed = self->state == META_BARRIER_STATE_HELD;
   event->released = old_state == META_BARRIER_STATE_RELEASE;
 
-  priv->last_event_time = time;
+  self->last_event_time = time;
 
-  if (priv->state == META_BARRIER_STATE_HELD)
+  if (self->state == META_BARRIER_STATE_HELD)
     _meta_barrier_emit_hit_signal (barrier, event);
   else
     _meta_barrier_emit_left_signal (barrier, event);
@@ -407,11 +401,10 @@ static void
 maybe_emit_barrier_event (gpointer key, gpointer value, gpointer user_data)
 {
   MetaBarrierImplNative *self = key;
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
   MetaBarrierEventData *data = user_data;
 
-  switch (priv->state) {
+  switch (self->state)
+    {
     case META_BARRIER_STATE_ACTIVE:
       break;
     case META_BARRIER_STATE_HIT:
@@ -437,9 +430,7 @@ clamp_to_barrier (MetaBarrierImplNative *self,
                   float *x,
                   float *y)
 {
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
-  MetaBarrier *barrier = priv->barrier;
+  MetaBarrier *barrier = self->barrier;
 
   if (is_barrier_horizontal (barrier))
     {
@@ -448,7 +439,7 @@ clamp_to_barrier (MetaBarrierImplNative *self,
       else if (*motion_dir & META_BARRIER_DIRECTION_NEGATIVE_Y)
         *y = barrier->priv->border.line.a.y;
 
-      priv->blocked_dir = *motion_dir & (META_BARRIER_DIRECTION_POSITIVE_Y |
+      self->blocked_dir = *motion_dir & (META_BARRIER_DIRECTION_POSITIVE_Y |
                                          META_BARRIER_DIRECTION_NEGATIVE_Y);
       *motion_dir &= ~(META_BARRIER_DIRECTION_POSITIVE_Y |
                        META_BARRIER_DIRECTION_NEGATIVE_Y);
@@ -460,13 +451,13 @@ clamp_to_barrier (MetaBarrierImplNative *self,
       else if (*motion_dir & META_BARRIER_DIRECTION_NEGATIVE_X)
         *x = barrier->priv->border.line.a.x;
 
-      priv->blocked_dir = *motion_dir & (META_BARRIER_DIRECTION_POSITIVE_X |
+      self->blocked_dir = *motion_dir & (META_BARRIER_DIRECTION_POSITIVE_X |
                                          META_BARRIER_DIRECTION_NEGATIVE_X);
       *motion_dir &= ~(META_BARRIER_DIRECTION_POSITIVE_X |
                        META_BARRIER_DIRECTION_NEGATIVE_X);
     }
 
-  priv->state = META_BARRIER_STATE_HIT;
+  self->state = META_BARRIER_STATE_HIT;
 }
 
 void
@@ -538,10 +529,8 @@ static gboolean
 _meta_barrier_impl_native_is_active (MetaBarrierImpl *impl)
 {
   MetaBarrierImplNative *self = META_BARRIER_IMPL_NATIVE (impl);
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
 
-  return priv->is_active;
+  return self->is_active;
 }
 
 static void
@@ -549,42 +538,36 @@ _meta_barrier_impl_native_release (MetaBarrierImpl  *impl,
                                    MetaBarrierEvent *event)
 {
   MetaBarrierImplNative *self = META_BARRIER_IMPL_NATIVE (impl);
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
 
-  if (priv->state == META_BARRIER_STATE_HELD &&
-      event->event_id == priv->trigger_serial)
-    priv->state = META_BARRIER_STATE_RELEASE;
+  if (self->state == META_BARRIER_STATE_HELD &&
+      event->event_id == self->trigger_serial)
+    self->state = META_BARRIER_STATE_RELEASE;
 }
 
 static void
 _meta_barrier_impl_native_destroy (MetaBarrierImpl *impl)
 {
   MetaBarrierImplNative *self = META_BARRIER_IMPL_NATIVE (impl);
-  MetaBarrierImplNativePrivate *priv =
-    meta_barrier_impl_native_get_instance_private (self);
 
-  g_hash_table_remove (priv->manager->barriers, self);
-  priv->is_active = FALSE;
+  g_hash_table_remove (self->manager->barriers, self);
+  self->is_active = FALSE;
 }
 
 MetaBarrierImpl *
 meta_barrier_impl_native_new (MetaBarrier *barrier)
 {
   MetaBarrierImplNative *self;
-  MetaBarrierImplNativePrivate *priv;
   MetaBackendNative *native;
   MetaBarrierManagerNative *manager;
 
   self = g_object_new (META_TYPE_BARRIER_IMPL_NATIVE, NULL);
-  priv = meta_barrier_impl_native_get_instance_private (self);
 
-  priv->barrier = barrier;
-  priv->is_active = TRUE;
+  self->barrier = barrier;
+  self->is_active = TRUE;
 
   native = META_BACKEND_NATIVE (meta_get_backend ());
   manager = meta_backend_native_get_barrier_manager (native);
-  priv->manager = manager;
+  self->manager = manager;
   g_hash_table_add (manager->barriers, self);
 
   return META_BARRIER_IMPL (self);
diff --git a/src/backends/native/meta-barrier-native.h b/src/backends/native/meta-barrier-native.h
index 0fc414a16..2853cfa80 100644
--- a/src/backends/native/meta-barrier-native.h
+++ b/src/backends/native/meta-barrier-native.h
@@ -29,30 +29,14 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_BARRIER_IMPL_NATIVE            (meta_barrier_impl_native_get_type ())
-#define META_BARRIER_IMPL_NATIVE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_BARRIER_IMPL_NATIVE, MetaBarrierImplNative))
-#define META_BARRIER_IMPL_NATIVE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_BARRIER_IMPL_NATIVE, MetaBarrierImplNativeClass))
-#define META_IS_BARRIER_IMPL_NATIVE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_BARRIER_IMPL_NATIVE))
-#define META_IS_BARRIER_IMPL_NATIVE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_BARRIER_IMPL_NATIVE))
-#define META_BARRIER_IMPL_NATIVE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_BARRIER_IMPL_NATIVE, MetaBarrierImplNativeClass))
-
-typedef struct _MetaBarrierImplNative        MetaBarrierImplNative;
-typedef struct _MetaBarrierImplNativeClass   MetaBarrierImplNativeClass;
-typedef struct _MetaBarrierImplNativePrivate MetaBarrierImplNativePrivate;
+#define META_TYPE_BARRIER_IMPL_NATIVE (meta_barrier_impl_native_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBarrierImplNative,
+                      meta_barrier_impl_native,
+                      META, BARRIER_IMPL_NATIVE,
+                      MetaBarrierImpl)
 
 typedef struct _MetaBarrierManagerNative     MetaBarrierManagerNative;
 
-struct _MetaBarrierImplNative
-{
-  MetaBarrierImpl parent;
-};
-
-struct _MetaBarrierImplNativeClass
-{
-  MetaBarrierImplClass parent_class;
-};
-
-GType meta_barrier_impl_native_get_type (void) G_GNUC_CONST;
 
 MetaBarrierImpl *meta_barrier_impl_native_new (MetaBarrier *barrier);
 
diff --git a/src/backends/x11/meta-barrier-x11.c b/src/backends/x11/meta-barrier-x11.c
index d8231b607..4cf58a81a 100644
--- a/src/backends/x11/meta-barrier-x11.c
+++ b/src/backends/x11/meta-barrier-x11.c
@@ -40,23 +40,24 @@
 #include "meta/barrier.h"
 #include "x11/meta-x11-display-private.h"
 
-struct _MetaBarrierImplX11Private
+struct _MetaBarrierImplX11
 {
+  MetaBarrierImpl parent;
+
   MetaBarrier *barrier;
   PointerBarrier xbarrier;
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (MetaBarrierImplX11, meta_barrier_impl_x11,
-                            META_TYPE_BARRIER_IMPL)
+G_DEFINE_TYPE (MetaBarrierImplX11,
+               meta_barrier_impl_x11,
+               META_TYPE_BARRIER_IMPL)
 
 static gboolean
 _meta_barrier_impl_x11_is_active (MetaBarrierImpl *impl)
 {
   MetaBarrierImplX11 *self = META_BARRIER_IMPL_X11 (impl);
-  MetaBarrierImplX11Private *priv =
-    meta_barrier_impl_x11_get_instance_private (self);
 
-  return priv->xbarrier != 0;
+  return self->xbarrier != 0;
 }
 
 static void
@@ -64,16 +65,14 @@ _meta_barrier_impl_x11_release (MetaBarrierImpl  *impl,
                                 MetaBarrierEvent *event)
 {
   MetaBarrierImplX11 *self = META_BARRIER_IMPL_X11 (impl);
-  MetaBarrierImplX11Private *priv =
-    meta_barrier_impl_x11_get_instance_private (self);
-  MetaDisplay *display = priv->barrier->priv->display;
+  MetaDisplay *display = self->barrier->priv->display;
   Display *dpy = meta_x11_display_get_xdisplay (display->x11_display);
 
   if (META_X11_DISPLAY_HAS_XINPUT_23 (display->x11_display))
     {
       XIBarrierReleasePointer (dpy,
                                META_VIRTUAL_CORE_POINTER_ID,
-                               priv->xbarrier, event->event_id);
+                               self->xbarrier, event->event_id);
     }
 }
 
@@ -81,9 +80,7 @@ static void
 _meta_barrier_impl_x11_destroy (MetaBarrierImpl *impl)
 {
   MetaBarrierImplX11 *self = META_BARRIER_IMPL_X11 (impl);
-  MetaBarrierImplX11Private *priv =
-    meta_barrier_impl_x11_get_instance_private (self);
-  MetaDisplay *display = priv->barrier->priv->display;
+  MetaDisplay *display = self->barrier->priv->display;
   Display *dpy;
 
   if (display == NULL)
@@ -91,19 +88,18 @@ _meta_barrier_impl_x11_destroy (MetaBarrierImpl *impl)
 
   dpy = meta_x11_display_get_xdisplay (display->x11_display);
 
-  if (!meta_barrier_is_active (priv->barrier))
+  if (!meta_barrier_is_active (self->barrier))
     return;
 
-  XFixesDestroyPointerBarrier (dpy, priv->xbarrier);
-  g_hash_table_remove (display->x11_display->xids, &priv->xbarrier);
-  priv->xbarrier = 0;
+  XFixesDestroyPointerBarrier (dpy, self->xbarrier);
+  g_hash_table_remove (display->x11_display->xids, &self->xbarrier);
+  self->xbarrier = 0;
 }
 
 MetaBarrierImpl *
 meta_barrier_impl_x11_new (MetaBarrier *barrier)
 {
   MetaBarrierImplX11 *self;
-  MetaBarrierImplX11Private *priv;
   MetaDisplay *display = barrier->priv->display;
   Display *dpy;
   Window root;
@@ -116,15 +112,14 @@ meta_barrier_impl_x11_new (MetaBarrier *barrier)
     }
 
   self = g_object_new (META_TYPE_BARRIER_IMPL_X11, NULL);
-  priv = meta_barrier_impl_x11_get_instance_private (self);
-  priv->barrier = barrier;
+  self->barrier = barrier;
 
   dpy = meta_x11_display_get_xdisplay (display->x11_display);
   root = DefaultRootWindow (dpy);
 
   allowed_motion_dirs =
     meta_border_get_allows_directions (&barrier->priv->border);
-  priv->xbarrier = XFixesCreatePointerBarrier (dpy, root,
+  self->xbarrier = XFixesCreatePointerBarrier (dpy, root,
                                                barrier->priv->border.line.a.x,
                                                barrier->priv->border.line.a.y,
                                                barrier->priv->border.line.b.x,
@@ -132,7 +127,7 @@ meta_barrier_impl_x11_new (MetaBarrier *barrier)
                                                allowed_motion_dirs,
                                                0, NULL);
 
-  g_hash_table_insert (display->x11_display->xids, &priv->xbarrier, barrier);
+  g_hash_table_insert (display->x11_display->xids, &self->xbarrier, barrier);
 
   return META_BARRIER_IMPL (self);
 }
diff --git a/src/backends/x11/meta-barrier-x11.h b/src/backends/x11/meta-barrier-x11.h
index 59e5fa4a7..3562d106f 100644
--- a/src/backends/x11/meta-barrier-x11.h
+++ b/src/backends/x11/meta-barrier-x11.h
@@ -29,28 +29,11 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_BARRIER_IMPL_X11            (meta_barrier_impl_x11_get_type ())
-#define META_BARRIER_IMPL_X11(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_BARRIER_IMPL_X11, MetaBarrierImplX11))
-#define META_BARRIER_IMPL_X11_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_BARRIER_IMPL_X11, MetaBarrierImplX11Class))
-#define META_IS_BARRIER_IMPL_X11(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_BARRIER_IMPL_X11))
-#define META_IS_BARRIER_IMPL_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_BARRIER_IMPL_X11))
-#define META_BARRIER_IMPL_X11_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_BARRIER_IMPL_X11, MetaBarrierImplX11Class))
-
-typedef struct _MetaBarrierImplX11        MetaBarrierImplX11;
-typedef struct _MetaBarrierImplX11Class   MetaBarrierImplX11Class;
-typedef struct _MetaBarrierImplX11Private MetaBarrierImplX11Private;
-
-struct _MetaBarrierImplX11
-{
-  MetaBarrierImpl parent;
-};
-
-struct _MetaBarrierImplX11Class
-{
-  MetaBarrierImplClass parent_class;
-};
-
-GType meta_barrier_impl_x11_get_type (void) G_GNUC_CONST;
+#define META_TYPE_BARRIER_IMPL_X11 (meta_barrier_impl_x11_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBarrierImplX11,
+                      meta_barrier_impl_x11,
+                      META, BARRIER_IMPL_X11,
+                      MetaBarrierImpl)
 
 MetaBarrierImpl *meta_barrier_impl_x11_new (MetaBarrier *barrier);
 
diff --git a/src/compositor/meta-background-actor.c b/src/compositor/meta-background-actor.c
index 2b619eb27..49b44a741 100644
--- a/src/compositor/meta-background-actor.c
+++ b/src/compositor/meta-background-actor.c
@@ -149,8 +149,10 @@ typedef enum {
   PIPELINE_GRADIENT = (1 << 2),
 } PipelineFlags;
 
-struct _MetaBackgroundActorPrivate
+struct _MetaBackgroundActor
 {
+  ClutterActor parent;
+
   MetaDisplay *display;
   int monitor;
 
@@ -176,32 +178,28 @@ struct _MetaBackgroundActorPrivate
 static void cullable_iface_init (MetaCullableInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (MetaBackgroundActor, meta_background_actor, CLUTTER_TYPE_ACTOR,
-                         G_ADD_PRIVATE (MetaBackgroundActor)
                          G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
 
 static void
 set_clip_region (MetaBackgroundActor *self,
                  cairo_region_t      *clip_region)
 {
-  MetaBackgroundActorPrivate *priv = self->priv;
-
-  g_clear_pointer (&priv->clip_region, cairo_region_destroy);
+  g_clear_pointer (&self->clip_region, cairo_region_destroy);
   if (clip_region)
-    priv->clip_region = cairo_region_copy (clip_region);
+    self->clip_region = cairo_region_copy (clip_region);
 }
 
 static void
 meta_background_actor_dispose (GObject *object)
 {
   MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object);
-  MetaBackgroundActorPrivate *priv = self->priv;
 
   set_clip_region (self, NULL);
   meta_background_actor_set_background (self, NULL);
-  if (priv->pipeline)
+  if (self->pipeline)
     {
-      cogl_object_unref (priv->pipeline);
-      priv->pipeline = NULL;
+      cogl_object_unref (self->pipeline);
+      self->pipeline = NULL;
     }
 
   G_OBJECT_CLASS (meta_background_actor_parent_class)->dispose (object);
@@ -212,11 +210,10 @@ get_preferred_size (MetaBackgroundActor *self,
                     gfloat              *width,
                     gfloat              *height)
 {
-  MetaBackgroundActorPrivate *priv = META_BACKGROUND_ACTOR (self)->priv;
   MetaRectangle monitor_geometry;
 
-  meta_display_get_monitor_geometry (priv->display,
-                                     priv->monitor,
+  meta_display_get_monitor_geometry (self->display,
+                                     self->monitor,
                                      &monitor_geometry);
 
   if (width != NULL)
@@ -325,7 +322,6 @@ static void
 setup_pipeline (MetaBackgroundActor   *self,
                 cairo_rectangle_int_t *actor_pixel_rect)
 {
-  MetaBackgroundActorPrivate *priv = self->priv;
   PipelineFlags pipeline_flags = 0;
   guint8 opacity;
   float color_component;
@@ -334,75 +330,75 @@ setup_pipeline (MetaBackgroundActor   *self,
   opacity = clutter_actor_get_paint_opacity (CLUTTER_ACTOR (self));
   if (opacity < 255)
     pipeline_flags |= PIPELINE_BLEND;
-  if (priv->vignette && clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
+  if (self->vignette && clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
     pipeline_flags |= PIPELINE_VIGNETTE;
-  if (priv->gradient && clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
+  if (self->gradient && clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
     pipeline_flags |= PIPELINE_GRADIENT;
 
-  if (priv->pipeline &&
-      pipeline_flags != priv->pipeline_flags)
+  if (self->pipeline &&
+      pipeline_flags != self->pipeline_flags)
     {
-      cogl_object_unref (priv->pipeline);
-      priv->pipeline = NULL;
+      cogl_object_unref (self->pipeline);
+      self->pipeline = NULL;
     }
 
-  if (priv->pipeline == NULL)
+  if (self->pipeline == NULL)
     {
-      priv->pipeline_flags = pipeline_flags;
-      priv->pipeline = make_pipeline (pipeline_flags);
-      priv->changed = CHANGED_ALL;
+      self->pipeline_flags = pipeline_flags;
+      self->pipeline = make_pipeline (pipeline_flags);
+      self->changed = CHANGED_ALL;
     }
 
-  if ((priv->changed & CHANGED_BACKGROUND) != 0)
+  if ((self->changed & CHANGED_BACKGROUND) != 0)
     {
       CoglPipelineWrapMode wrap_mode;
-      CoglTexture *texture = meta_background_get_texture (priv->background,
-                                                          priv->monitor,
-                                                          &priv->texture_area,
+      CoglTexture *texture = meta_background_get_texture (self->background,
+                                                          self->monitor,
+                                                          &self->texture_area,
                                                           &wrap_mode);
-      priv->force_bilinear = texture &&
-        (priv->texture_area.width != (int)cogl_texture_get_width (texture) ||
-         priv->texture_area.height != (int)cogl_texture_get_height (texture));
+      self->force_bilinear = texture &&
+        (self->texture_area.width != (int)cogl_texture_get_width (texture) ||
+         self->texture_area.height != (int)cogl_texture_get_height (texture));
 
-      cogl_pipeline_set_layer_texture (priv->pipeline, 0, texture);
-      cogl_pipeline_set_layer_wrap_mode (priv->pipeline, 0, wrap_mode);
+      cogl_pipeline_set_layer_texture (self->pipeline, 0, texture);
+      cogl_pipeline_set_layer_wrap_mode (self->pipeline, 0, wrap_mode);
 
-      priv->changed &= ~CHANGED_BACKGROUND;
+      self->changed &= ~CHANGED_BACKGROUND;
     }
 
-  if ((priv->changed & CHANGED_VIGNETTE_PARAMETERS) != 0)
+  if ((self->changed & CHANGED_VIGNETTE_PARAMETERS) != 0)
     {
-      cogl_pipeline_set_uniform_1f (priv->pipeline,
-                                    cogl_pipeline_get_uniform_location (priv->pipeline,
+      cogl_pipeline_set_uniform_1f (self->pipeline,
+                                    cogl_pipeline_get_uniform_location (self->pipeline,
                                                                         "vignette_sharpness"),
-                                    priv->vignette_sharpness);
+                                    self->vignette_sharpness);
 
-      priv->changed &= ~CHANGED_VIGNETTE_PARAMETERS;
+      self->changed &= ~CHANGED_VIGNETTE_PARAMETERS;
     }
 
-  if ((priv->changed & CHANGED_GRADIENT_PARAMETERS) != 0)
+  if ((self->changed & CHANGED_GRADIENT_PARAMETERS) != 0)
     {
       MetaRectangle monitor_geometry;
       float gradient_height_perc;
 
-      meta_display_get_monitor_geometry (priv->display,
-                                         priv->monitor, &monitor_geometry);
-      gradient_height_perc = MAX (0.0001, priv->gradient_height / (float)monitor_geometry.height);
-      cogl_pipeline_set_uniform_1f (priv->pipeline,
-                                    cogl_pipeline_get_uniform_location (priv->pipeline,
+      meta_display_get_monitor_geometry (self->display,
+                                         self->monitor, &monitor_geometry);
+      gradient_height_perc = MAX (0.0001, self->gradient_height / (float)monitor_geometry.height);
+      cogl_pipeline_set_uniform_1f (self->pipeline,
+                                    cogl_pipeline_get_uniform_location (self->pipeline,
                                                                         "gradient_height_perc"),
                                     gradient_height_perc);
-      cogl_pipeline_set_uniform_1f (priv->pipeline,
-                                    cogl_pipeline_get_uniform_location (priv->pipeline,
+      cogl_pipeline_set_uniform_1f (self->pipeline,
+                                    cogl_pipeline_get_uniform_location (self->pipeline,
                                                                         "gradient_max_darkness"),
-                                    priv->gradient_max_darkness);
+                                    self->gradient_max_darkness);
 
-      priv->changed &= ~CHANGED_GRADIENT_PARAMETERS;
+      self->changed &= ~CHANGED_GRADIENT_PARAMETERS;
     }
 
-  if (priv->vignette)
+  if (self->vignette)
     {
-      color_component = priv->vignette_brightness * opacity / 255.;
+      color_component = self->vignette_brightness * opacity / 255.;
 
       if (!clutter_feature_available (CLUTTER_FEATURE_SHADERS_GLSL))
         {
@@ -410,50 +406,49 @@ setup_pipeline (MetaBackgroundActor   *self,
            * be there if we were drawing the vignette, which is
            * (1 - (pi/12.) * vignette_sharpness) [exercise for the reader :]
            */
-          color_component *= (1 - 0.74 * priv->vignette_sharpness);
+          color_component *= (1 - 0.74 * self->vignette_sharpness);
         }
     }
   else
     color_component = opacity / 255.;
 
-  cogl_pipeline_set_color4f (priv->pipeline,
+  cogl_pipeline_set_color4f (self->pipeline,
                              color_component,
                              color_component,
                              color_component,
                              opacity / 255.);
 
-  if (!priv->force_bilinear &&
+  if (!self->force_bilinear &&
       meta_actor_painting_untransformed (actor_pixel_rect->width, actor_pixel_rect->height, NULL, NULL))
     filter = COGL_PIPELINE_FILTER_NEAREST;
   else
     filter = COGL_PIPELINE_FILTER_LINEAR;
 
-  cogl_pipeline_set_layer_filters (priv->pipeline, 0, filter, filter);
+  cogl_pipeline_set_layer_filters (self->pipeline, 0, filter, filter);
 }
 
 static void
 set_glsl_parameters (MetaBackgroundActor   *self,
                      cairo_rectangle_int_t *actor_pixel_rect)
 {
-  MetaBackgroundActorPrivate *priv = self->priv;
   float scale[2];
   float offset[2];
 
   /* Compute a scale and offset for transforming texture coordinates to the
    * coordinate system from [-0.5 to 0.5] across the area of the actor
    */
-  scale[0] = priv->texture_area.width / (float)actor_pixel_rect->width;
-  scale[1] = priv->texture_area.height / (float)actor_pixel_rect->height;
-  offset[0] = priv->texture_area.x / (float)actor_pixel_rect->width - 0.5;
-  offset[1] = priv->texture_area.y / (float)actor_pixel_rect->height - 0.5;
+  scale[0] = self->texture_area.width / (float)actor_pixel_rect->width;
+  scale[1] = self->texture_area.height / (float)actor_pixel_rect->height;
+  offset[0] = self->texture_area.x / (float)actor_pixel_rect->width - 0.5;
+  offset[1] = self->texture_area.y / (float)actor_pixel_rect->height - 0.5;
 
-  cogl_pipeline_set_uniform_float (priv->pipeline,
-                                   cogl_pipeline_get_uniform_location (priv->pipeline,
+  cogl_pipeline_set_uniform_float (self->pipeline,
+                                   cogl_pipeline_get_uniform_location (self->pipeline,
                                                                        "scale"),
                                    2, 1, scale);
 
-  cogl_pipeline_set_uniform_float (priv->pipeline,
-                                   cogl_pipeline_get_uniform_location (priv->pipeline,
+  cogl_pipeline_set_uniform_float (self->pipeline,
+                                   cogl_pipeline_get_uniform_location (self->pipeline,
                                                                        "offset"),
                                    2, 1, offset);
 }
@@ -493,13 +488,12 @@ static void
 meta_background_actor_paint (ClutterActor *actor)
 {
   MetaBackgroundActor *self = META_BACKGROUND_ACTOR (actor);
-  MetaBackgroundActorPrivate *priv = self->priv;
   ClutterActorBox actor_box;
   cairo_rectangle_int_t actor_pixel_rect;
   CoglFramebuffer *fb;
   int i;
 
-  if ((priv->clip_region && cairo_region_is_empty (priv->clip_region)))
+  if ((self->clip_region && cairo_region_is_empty (self->clip_region)))
     return;
 
   clutter_actor_get_content_box (actor, &actor_box);
@@ -519,27 +513,27 @@ meta_background_actor_paint (ClutterActor *actor)
 
   /* Now figure out what to actually paint.
    */
-  if (priv->clip_region != NULL)
+  if (self->clip_region != NULL)
     {
-      int n_rects = cairo_region_num_rectangles (priv->clip_region);
+      int n_rects = cairo_region_num_rectangles (self->clip_region);
       if (n_rects <= MAX_RECTS)
         {
            for (i = 0; i < n_rects; i++)
              {
                cairo_rectangle_int_t rect;
-               cairo_region_get_rectangle (priv->clip_region, i, &rect);
+               cairo_region_get_rectangle (self->clip_region, i, &rect);
 
                if (!gdk_rectangle_intersect (&actor_pixel_rect, &rect, &rect))
                  continue;
 
-               paint_clipped_rectangle (fb, priv->pipeline, &rect, &priv->texture_area);
+               paint_clipped_rectangle (fb, self->pipeline, &rect, &self->texture_area);
              }
 
            return;
         }
     }
 
-  paint_clipped_rectangle (fb, priv->pipeline, &actor_pixel_rect, &priv->texture_area);
+  paint_clipped_rectangle (fb, self->pipeline, &actor_pixel_rect, &self->texture_area);
 }
 
 static void
@@ -549,12 +543,11 @@ meta_background_actor_set_property (GObject      *object,
                                     GParamSpec   *pspec)
 {
   MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object);
-  MetaBackgroundActorPrivate *priv = self->priv;
 
   switch (prop_id)
     {
     case PROP_META_DISPLAY:
-      priv->display = g_value_get_object (value);
+      self->display = g_value_get_object (value);
       break;
     case PROP_MONITOR:
       meta_background_actor_set_monitor (self, g_value_get_int (value));
@@ -565,38 +558,38 @@ meta_background_actor_set_property (GObject      *object,
     case PROP_GRADIENT:
       meta_background_actor_set_gradient (self,
                                           g_value_get_boolean (value),
-                                          priv->gradient_height,
-                                          priv->gradient_max_darkness);
+                                          self->gradient_height,
+                                          self->gradient_max_darkness);
       break;
     case PROP_GRADIENT_HEIGHT:
       meta_background_actor_set_gradient (self,
-                                          priv->gradient,
+                                          self->gradient,
                                           g_value_get_int (value),
-                                          priv->gradient_max_darkness);
+                                          self->gradient_max_darkness);
       break;
     case PROP_GRADIENT_MAX_DARKNESS:
       meta_background_actor_set_gradient (self,
-                                          priv->gradient,
-                                          priv->gradient_height,
+                                          self->gradient,
+                                          self->gradient_height,
                                           g_value_get_double (value));
       break;
     case PROP_VIGNETTE:
       meta_background_actor_set_vignette (self,
                                           g_value_get_boolean (value),
-                                          priv->vignette_brightness,
-                                          priv->vignette_sharpness);
+                                          self->vignette_brightness,
+                                          self->vignette_sharpness);
       break;
     case PROP_VIGNETTE_SHARPNESS:
       meta_background_actor_set_vignette (self,
-                                          priv->vignette,
-                                          priv->vignette_brightness,
+                                          self->vignette,
+                                          self->vignette_brightness,
                                           g_value_get_double (value));
       break;
     case PROP_VIGNETTE_BRIGHTNESS:
       meta_background_actor_set_vignette (self,
-                                          priv->vignette,
+                                          self->vignette,
                                           g_value_get_double (value),
-                                          priv->vignette_sharpness);
+                                          self->vignette_sharpness);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -610,36 +603,36 @@ meta_background_actor_get_property (GObject      *object,
                                     GValue       *value,
                                     GParamSpec   *pspec)
 {
-  MetaBackgroundActorPrivate *priv = META_BACKGROUND_ACTOR (object)->priv;
+  MetaBackgroundActor *self = META_BACKGROUND_ACTOR (object);
 
   switch (prop_id)
     {
     case PROP_META_DISPLAY:
-      g_value_set_object (value, priv->display);
+      g_value_set_object (value, self->display);
       break;
     case PROP_MONITOR:
-      g_value_set_int (value, priv->monitor);
+      g_value_set_int (value, self->monitor);
       break;
     case PROP_BACKGROUND:
-      g_value_set_object (value, priv->background);
+      g_value_set_object (value, self->background);
       break;
     case PROP_GRADIENT:
-      g_value_set_boolean (value, priv->gradient);
+      g_value_set_boolean (value, self->gradient);
       break;
     case PROP_GRADIENT_HEIGHT:
-      g_value_set_int (value, priv->gradient_height);
+      g_value_set_int (value, self->gradient_height);
       break;
     case PROP_GRADIENT_MAX_DARKNESS:
-      g_value_set_double (value, priv->gradient_max_darkness);
+      g_value_set_double (value, self->gradient_max_darkness);
       break;
     case PROP_VIGNETTE:
-      g_value_set_boolean (value, priv->vignette);
+      g_value_set_boolean (value, self->vignette);
       break;
     case PROP_VIGNETTE_BRIGHTNESS:
-      g_value_set_double (value, priv->vignette_brightness);
+      g_value_set_double (value, self->vignette_brightness);
       break;
     case PROP_VIGNETTE_SHARPNESS:
-      g_value_set_double (value, priv->vignette_sharpness);
+      g_value_set_double (value, self->vignette_sharpness);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -757,19 +750,13 @@ meta_background_actor_class_init (MetaBackgroundActorClass *klass)
 static void
 meta_background_actor_init (MetaBackgroundActor *self)
 {
-  MetaBackgroundActorPrivate *priv;
-
-  priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
-                                                   META_TYPE_BACKGROUND_ACTOR,
-                                                   MetaBackgroundActorPrivate);
-
-  priv->gradient = FALSE;
-  priv->gradient_height = 0;
-  priv->gradient_max_darkness = 0.0;
+  self->gradient = FALSE;
+  self->gradient_height = 0;
+  self->gradient_max_darkness = 0.0;
 
-  priv->vignette = FALSE;
-  priv->vignette_brightness = 1.0;
-  priv->vignette_sharpness = 0.0;
+  self->vignette = FALSE;
+  self->vignette_brightness = 1.0;
+  self->vignette_sharpness = 0.0;
 }
 
 /**
@@ -828,17 +815,14 @@ cullable_iface_init (MetaCullableInterface *iface)
 cairo_region_t *
 meta_background_actor_get_clip_region (MetaBackgroundActor *self)
 {
-  MetaBackgroundActorPrivate *priv = self->priv;
-  return priv->clip_region;
+  return self->clip_region;
 }
 
 static void
 invalidate_pipeline (MetaBackgroundActor *self,
                      ChangedFlags         changed)
 {
-  MetaBackgroundActorPrivate *priv = self->priv;
-
-  priv->changed |= changed;
+  self->changed |= changed;
 }
 
 static void
@@ -853,29 +837,25 @@ void
 meta_background_actor_set_background (MetaBackgroundActor *self,
                                       MetaBackground      *background)
 {
-  MetaBackgroundActorPrivate *priv;
-
   g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
   g_return_if_fail (background == NULL || META_IS_BACKGROUND (background));
 
-  priv = self->priv;
-
-  if (background == priv->background)
+  if (background == self->background)
     return;
 
-  if (priv->background)
+  if (self->background)
     {
-      g_signal_handlers_disconnect_by_func (priv->background,
+      g_signal_handlers_disconnect_by_func (self->background,
                                             (gpointer)on_background_changed,
                                             self);
-      g_object_unref (priv->background);
-      priv->background = NULL;
+      g_object_unref (self->background);
+      self->background = NULL;
     }
 
   if (background)
     {
-      priv->background = g_object_ref (background);
-      g_signal_connect (priv->background, "changed",
+      self->background = g_object_ref (background);
+      g_signal_connect (self->background, "changed",
                         G_CALLBACK (on_background_changed), self);
     }
 
@@ -889,28 +869,25 @@ meta_background_actor_set_gradient (MetaBackgroundActor *self,
                                     int                  height,
                                     double               max_darkness)
 {
-  MetaBackgroundActorPrivate *priv;
   gboolean changed = FALSE;
 
   g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
   g_return_if_fail (height >= 0);
   g_return_if_fail (max_darkness >= 0. && max_darkness <= 1.);
 
-  priv = self->priv;
-
   enabled = enabled != FALSE && height != 0;
 
-  if (enabled != priv->gradient)
+  if (enabled != self->gradient)
     {
-      priv->gradient = enabled;
+      self->gradient = enabled;
       invalidate_pipeline (self, CHANGED_EFFECTS);
       changed = TRUE;
     }
 
-  if (height != priv->gradient_height || max_darkness != priv->gradient_max_darkness)
+  if (height != self->gradient_height || max_darkness != self->gradient_max_darkness)
     {
-      priv->gradient_height = height;
-      priv->gradient_max_darkness = max_darkness;
+      self->gradient_height = height;
+      self->gradient_max_darkness = max_darkness;
       invalidate_pipeline (self, CHANGED_GRADIENT_PARAMETERS);
       changed = TRUE;
     }
@@ -923,20 +900,19 @@ void
 meta_background_actor_set_monitor (MetaBackgroundActor *self,
                                    int                  monitor)
 {
-  MetaBackgroundActorPrivate *priv = self->priv;
   MetaRectangle old_monitor_geometry;
   MetaRectangle new_monitor_geometry;
-  MetaDisplay *display = priv->display;
+  MetaDisplay *display = self->display;
 
-  if(priv->monitor == monitor)
+  if(self->monitor == monitor)
       return;
 
-  meta_display_get_monitor_geometry (display, priv->monitor, &old_monitor_geometry);
+  meta_display_get_monitor_geometry (display, self->monitor, &old_monitor_geometry);
   meta_display_get_monitor_geometry (display, monitor, &new_monitor_geometry);
   if(old_monitor_geometry.height != new_monitor_geometry.height)
       invalidate_pipeline (self, CHANGED_GRADIENT_PARAMETERS);
 
-  priv->monitor = monitor;
+  self->monitor = monitor;
 }
 
 void
@@ -945,28 +921,25 @@ meta_background_actor_set_vignette (MetaBackgroundActor *self,
                                     double               brightness,
                                     double               sharpness)
 {
-  MetaBackgroundActorPrivate *priv;
   gboolean changed = FALSE;
 
   g_return_if_fail (META_IS_BACKGROUND_ACTOR (self));
   g_return_if_fail (brightness >= 0. && brightness <= 1.);
   g_return_if_fail (sharpness >= 0.);
 
-  priv = self->priv;
-
   enabled = enabled != FALSE;
 
-  if (enabled != priv->vignette)
+  if (enabled != self->vignette)
     {
-      priv->vignette = enabled;
+      self->vignette = enabled;
       invalidate_pipeline (self, CHANGED_EFFECTS);
       changed = TRUE;
     }
 
-  if (brightness != priv->vignette_brightness || sharpness != priv->vignette_sharpness)
+  if (brightness != self->vignette_brightness || sharpness != self->vignette_sharpness)
     {
-      priv->vignette_brightness = brightness;
-      priv->vignette_sharpness = sharpness;
+      self->vignette_brightness = brightness;
+      self->vignette_sharpness = sharpness;
       invalidate_pipeline (self, CHANGED_VIGNETTE_PARAMETERS);
       changed = TRUE;
     }
diff --git a/src/compositor/meta-background-group.c b/src/compositor/meta-background-group.c
index e30b8af4c..f3c125ab0 100644
--- a/src/compositor/meta-background-group.c
+++ b/src/compositor/meta-background-group.c
@@ -19,6 +19,11 @@
 #include "compositor/meta-cullable.h"
 #include "meta/meta-background-group.h"
 
+struct _MetaBackgroundGroup
+{
+  ClutterActor parent;
+};
+
 static void cullable_iface_init (MetaCullableInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (MetaBackgroundGroup, meta_background_group, CLUTTER_TYPE_ACTOR,
diff --git a/src/compositor/meta-background-image.c b/src/compositor/meta-background-image.c
index 802c10c76..14d3baf57 100644
--- a/src/compositor/meta-background-image.c
+++ b/src/compositor/meta-background-image.c
@@ -40,6 +40,13 @@ enum
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
+/**
+ * MetaBackgroundImageCache:
+ *
+ * #MetaBackgroundImageCache caches loading of textures for backgrounds; there's actually
+ * nothing background specific about it, other than it is tuned to work well for
+ * large images as typically are used for backgrounds.
+ */
 struct _MetaBackgroundImageCache
 {
   GObject parent_instance;
@@ -47,11 +54,11 @@ struct _MetaBackgroundImageCache
   GHashTable *images;
 };
 
-struct _MetaBackgroundImageCacheClass
-{
-  GObjectClass parent_class;
-};
-
+/**
+ * MetaBackgroundImage:
+ *
+ * #MetaBackgroundImage is an object that represents a loaded or loading background image.
+ */
 struct _MetaBackgroundImage
 {
   GObject parent_instance;
@@ -62,11 +69,6 @@ struct _MetaBackgroundImage
   CoglTexture *texture;
 };
 
-struct _MetaBackgroundImageClass
-{
-  GObjectClass parent_class;
-};
-
 G_DEFINE_TYPE (MetaBackgroundImageCache, meta_background_image_cache, G_TYPE_OBJECT);
 
 static void
diff --git a/src/compositor/meta-background.c b/src/compositor/meta-background.c
index 0fb20d569..760d08bce 100644
--- a/src/compositor/meta-background.c
+++ b/src/compositor/meta-background.c
@@ -47,8 +47,10 @@ struct _MetaBackgroundMonitor
   CoglFramebuffer *fbo;
 };
 
-struct _MetaBackgroundPrivate
+struct _MetaBackground
 {
+  GObject parent;
+
   MetaDisplay *display;
   MetaBackgroundMonitor *monitors;
   int n_monitors;
@@ -77,7 +79,7 @@ enum
   PROP_MONITOR,
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (MetaBackground, meta_background, G_TYPE_OBJECT)
+G_DEFINE_TYPE (MetaBackground, meta_background, G_TYPE_OBJECT)
 
 static gboolean texture_has_alpha (CoglTexture *texture);
 
@@ -86,13 +88,11 @@ static GSList *all_backgrounds = NULL;
 static void
 free_fbos (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
   int i;
 
-  for (i = 0; i < priv->n_monitors; i++)
+  for (i = 0; i < self->n_monitors; i++)
     {
-      MetaBackgroundMonitor *monitor = &priv->monitors[i];
+      MetaBackgroundMonitor *monitor = &self->monitors[i];
       if (monitor->fbo)
         {
           cogl_object_unref (monitor->fbo);
@@ -109,48 +109,42 @@ free_fbos (MetaBackground *self)
 static void
 free_color_texture (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
-  if (priv->color_texture != NULL)
+  if (self->color_texture != NULL)
     {
-      cogl_object_unref (priv->color_texture);
-      priv->color_texture = NULL;
+      cogl_object_unref (self->color_texture);
+      self->color_texture = NULL;
     }
 }
 
 static void
 free_wallpaper_texture (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
-  if (priv->wallpaper_texture != NULL)
+  if (self->wallpaper_texture != NULL)
     {
-      cogl_object_unref (priv->wallpaper_texture);
-      priv->wallpaper_texture = NULL;
+      cogl_object_unref (self->wallpaper_texture);
+      self->wallpaper_texture = NULL;
     }
 
-  priv->wallpaper_allocation_failed = FALSE;
+  self->wallpaper_allocation_failed = FALSE;
 }
 
 static void
 invalidate_monitor_backgrounds (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
   free_fbos (self);
-  g_free (priv->monitors);
-  priv->monitors = NULL;
-  priv->n_monitors = 0;
+  g_free (self->monitors);
+  self->monitors = NULL;
+  self->n_monitors = 0;
 
-  if (priv->display)
+  if (self->display)
     {
       int i;
 
-      priv->n_monitors = meta_display_get_n_monitors (priv->display);
-      priv->monitors = g_new0 (MetaBackgroundMonitor, priv->n_monitors);
+      self->n_monitors = meta_display_get_n_monitors (self->display);
+      self->monitors = g_new0 (MetaBackgroundMonitor, self->n_monitors);
 
-      for (i = 0; i < priv->n_monitors; i++)
-        priv->monitors[i].dirty = TRUE;
+      for (i = 0; i < self->n_monitors; i++)
+        self->monitors[i].dirty = TRUE;
     }
 }
 
@@ -164,9 +158,7 @@ static void
 set_display (MetaBackground *self,
              MetaDisplay    *display)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
-  g_set_object (&priv->display, display);
+  g_set_object (&self->display, display);
 
   invalidate_monitor_backgrounds (self);
 }
@@ -194,12 +186,12 @@ meta_background_get_property (GObject      *object,
                               GValue       *value,
                               GParamSpec   *pspec)
 {
-  MetaBackgroundPrivate *priv = META_BACKGROUND (object)->priv;
+  MetaBackground *self = META_BACKGROUND (object);
 
   switch (prop_id)
     {
     case PROP_META_DISPLAY:
-      g_value_set_object (value, priv->display);
+      g_value_set_object (value, self->display);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -210,14 +202,13 @@ meta_background_get_property (GObject      *object,
 static gboolean
 need_prerender (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-  CoglTexture *texture1 = priv->background_image1 ? meta_background_image_get_texture 
(priv->background_image1) : NULL;
-  CoglTexture *texture2 = priv->background_image2 ? meta_background_image_get_texture 
(priv->background_image2) : NULL;
+  CoglTexture *texture1 = self->background_image1 ? meta_background_image_get_texture 
(self->background_image1) : NULL;
+  CoglTexture *texture2 = self->background_image2 ? meta_background_image_get_texture 
(self->background_image2) : NULL;
 
   if (texture1 == NULL && texture2 == NULL)
     return FALSE;
 
-  if (texture2 == NULL && priv->style == G_DESKTOP_BACKGROUND_STYLE_WALLPAPER)
+  if (texture2 == NULL && self->style == G_DESKTOP_BACKGROUND_STYLE_WALLPAPER)
     return FALSE;
 
   return TRUE;
@@ -226,14 +217,13 @@ need_prerender (MetaBackground *self)
 static void
 mark_changed (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
   int i;
 
   if (!need_prerender (self))
     free_fbos (self);
 
-  for (i = 0; i < priv->n_monitors; i++)
-    priv->monitors[i].dirty = TRUE;
+  for (i = 0; i < self->n_monitors; i++)
+    self->monitors[i].dirty = TRUE;
 
   g_signal_emit (self, signals[CHANGED], 0);
 }
@@ -293,13 +283,12 @@ static void
 meta_background_dispose (GObject *object)
 {
   MetaBackground        *self = META_BACKGROUND (object);
-  MetaBackgroundPrivate *priv = self->priv;
 
   free_color_texture (self);
   free_wallpaper_texture (self);
 
-  set_file (self, &priv->file1, &priv->background_image1, NULL);
-  set_file (self, &priv->file2, &priv->background_image2, NULL);
+  set_file (self, &self->file1, &self->background_image1, NULL);
+  set_file (self, &self->file2, &self->background_image2, NULL);
 
   set_display (self, NULL);
 
@@ -318,12 +307,11 @@ static void
 meta_background_constructed (GObject *object)
 {
   MetaBackground        *self = META_BACKGROUND (object);
-  MetaBackgroundPrivate *priv = self->priv;
   MetaMonitorManager *monitor_manager = meta_monitor_manager_get ();
 
   G_OBJECT_CLASS (meta_background_parent_class)->constructed (object);
 
-  g_signal_connect_object (priv->display, "gl-video-memory-purged",
+  g_signal_connect_object (self->display, "gl-video-memory-purged",
                            G_CALLBACK (mark_changed), object, G_CONNECT_SWAPPED);
 
   g_signal_connect_object (monitor_manager, "monitors-changed",
@@ -366,9 +354,6 @@ meta_background_class_init (MetaBackgroundClass *klass)
 static void
 meta_background_init (MetaBackground *self)
 {
-  self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
-                                            META_TYPE_BACKGROUND,
-                                            MetaBackgroundPrivate);
   all_backgrounds = g_slist_prepend (all_backgrounds, self);
 }
 
@@ -388,7 +373,6 @@ get_texture_area (MetaBackground          *self,
                   CoglTexture             *texture,
                   cairo_rectangle_int_t   *texture_area)
 {
-  MetaBackgroundPrivate *priv = self->priv;
   cairo_rectangle_int_t image_area;
   int screen_width, screen_height;
   float texture_width, texture_height;
@@ -397,7 +381,7 @@ get_texture_area (MetaBackground          *self,
   texture_width = cogl_texture_get_width (texture);
   texture_height = cogl_texture_get_height (texture);
 
-  switch (priv->style)
+  switch (self->style)
     {
     case G_DESKTOP_BACKGROUND_STYLE_STRETCHED:
     default:
@@ -407,7 +391,7 @@ get_texture_area (MetaBackground          *self,
       set_texture_area_from_monitor_area (monitor_rect, texture_area);
       break;
     case G_DESKTOP_BACKGROUND_STYLE_WALLPAPER:
-      meta_display_get_size (priv->display, &screen_width, &screen_height);
+      meta_display_get_size (self->display, &screen_width, &screen_height);
 
       /* Start off by centering a tile in the middle of the
        * total screen area.
@@ -444,9 +428,9 @@ get_texture_area (MetaBackground          *self,
       monitor_x_scale = monitor_rect->width / texture_width;
       monitor_y_scale = monitor_rect->height / texture_height;
 
-      if ((priv->style == G_DESKTOP_BACKGROUND_STYLE_SCALED &&
+      if ((self->style == G_DESKTOP_BACKGROUND_STYLE_SCALED &&
            (monitor_x_scale < monitor_y_scale)) ||
-          (priv->style == G_DESKTOP_BACKGROUND_STYLE_ZOOM &&
+          (self->style == G_DESKTOP_BACKGROUND_STYLE_ZOOM &&
            (monitor_x_scale > monitor_y_scale)))
         {
           /* Fill image to exactly fit actor horizontally */
@@ -476,7 +460,7 @@ get_texture_area (MetaBackground          *self,
         /* paint region is the union of all monitors, with the origin
          * of the region set to align with monitor associated with the background.
          */
-        meta_display_get_size (priv->display, &screen_width, &screen_height);
+        meta_display_get_size (self->display, &screen_width, &screen_height);
 
         /* unclipped texture area is whole screen */
         image_area.width = screen_width;
@@ -499,13 +483,12 @@ draw_texture (MetaBackground        *self,
               CoglTexture           *texture,
               cairo_rectangle_int_t *monitor_area)
 {
-  MetaBackgroundPrivate *priv = self->priv;
   cairo_rectangle_int_t texture_area;
   gboolean bare_region_visible;
 
   get_texture_area (self, monitor_area, texture, &texture_area);
 
-  switch (priv->style)
+  switch (self->style)
     {
     case G_DESKTOP_BACKGROUND_STYLE_STRETCHED:
     case G_DESKTOP_BACKGROUND_STYLE_WALLPAPER:
@@ -550,9 +533,7 @@ draw_texture (MetaBackground        *self,
 static void
 ensure_color_texture (MetaBackground *self)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
-  if (priv->color_texture == NULL)
+  if (self->color_texture == NULL)
     {
       ClutterBackend *backend = clutter_get_default_backend ();
       CoglContext *ctx = clutter_backend_get_cogl_context (backend);
@@ -560,18 +541,18 @@ ensure_color_texture (MetaBackground *self)
       uint8_t pixels[6];
       int width, height;
 
-      if (priv->shading_direction == G_DESKTOP_BACKGROUND_SHADING_SOLID)
+      if (self->shading_direction == G_DESKTOP_BACKGROUND_SHADING_SOLID)
         {
           width = 1;
           height = 1;
 
-          pixels[0] = priv->color.red;
-          pixels[1] = priv->color.green;
-          pixels[2] = priv->color.blue;
+          pixels[0] = self->color.red;
+          pixels[1] = self->color.green;
+          pixels[2] = self->color.blue;
         }
       else
         {
-          switch (priv->shading_direction)
+          switch (self->shading_direction)
             {
             case G_DESKTOP_BACKGROUND_SHADING_VERTICAL:
               width = 1;
@@ -585,15 +566,15 @@ ensure_color_texture (MetaBackground *self)
               g_return_if_reached ();
             }
 
-          pixels[0] = priv->color.red;
-          pixels[1] = priv->color.green;
-          pixels[2] = priv->color.blue;
-          pixels[3] = priv->second_color.red;
-          pixels[4] = priv->second_color.green;
-          pixels[5] = priv->second_color.blue;
+          pixels[0] = self->color.red;
+          pixels[1] = self->color.green;
+          pixels[2] = self->color.blue;
+          pixels[3] = self->second_color.red;
+          pixels[4] = self->second_color.green;
+          pixels[5] = self->second_color.blue;
         }
 
-      priv->color_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
+      self->color_texture = COGL_TEXTURE (cogl_texture_2d_new_from_data (ctx, width, height,
                                                                          COGL_PIXEL_FORMAT_RGB_888,
                                                                          width * 3,
                                                                          pixels,
@@ -656,9 +637,7 @@ static gboolean
 ensure_wallpaper_texture (MetaBackground *self,
                           CoglTexture    *texture)
 {
-  MetaBackgroundPrivate *priv = self->priv;
-
-  if (priv->wallpaper_texture == NULL && !priv->wallpaper_allocation_failed)
+  if (self->wallpaper_texture == NULL && !self->wallpaper_allocation_failed)
     {
       int width = cogl_texture_get_width (texture);
       int height = cogl_texture_get_height (texture);
@@ -667,10 +646,10 @@ ensure_wallpaper_texture (MetaBackground *self,
       CoglError *catch_error = NULL;
       CoglPipeline *pipeline;
 
-      priv->wallpaper_texture = meta_create_texture (width, height,
+      self->wallpaper_texture = meta_create_texture (width, height,
                                                      COGL_TEXTURE_COMPONENTS_RGBA,
                                                      META_TEXTURE_FLAGS_NONE);
-      offscreen = cogl_offscreen_new_with_texture (priv->wallpaper_texture);
+      offscreen = cogl_offscreen_new_with_texture (self->wallpaper_texture);
       fbo = COGL_FRAMEBUFFER (offscreen);
 
       if (!cogl_framebuffer_allocate (fbo, &catch_error))
@@ -681,11 +660,11 @@ ensure_wallpaper_texture (MetaBackground *self,
            */
           cogl_error_free (catch_error);
 
-          cogl_object_unref (priv->wallpaper_texture);
-          priv->wallpaper_texture = NULL;
+          cogl_object_unref (self->wallpaper_texture);
+          self->wallpaper_texture = NULL;
           cogl_object_unref (fbo);
 
-          priv->wallpaper_allocation_failed = TRUE;
+          self->wallpaper_allocation_failed = TRUE;
           return FALSE;
         }
 
@@ -703,7 +682,7 @@ ensure_wallpaper_texture (MetaBackground *self,
           ensure_color_texture (self);
 
           pipeline = create_pipeline (PIPELINE_OVER_REVERSE);
-          cogl_pipeline_set_layer_texture (pipeline, 0, priv->color_texture);
+          cogl_pipeline_set_layer_texture (pipeline, 0, self->color_texture);
           cogl_framebuffer_draw_rectangle (fbo, pipeline, 0, 0, width, height);
           cogl_object_unref (pipeline);
         }
@@ -711,7 +690,7 @@ ensure_wallpaper_texture (MetaBackground *self,
       cogl_object_unref (fbo);
     }
 
-  return priv->wallpaper_texture != NULL;
+  return self->wallpaper_texture != NULL;
 }
 
 static CoglPipelineWrapMode
@@ -738,26 +717,24 @@ meta_background_get_texture (MetaBackground         *self,
                              cairo_rectangle_int_t  *texture_area,
                              CoglPipelineWrapMode   *wrap_mode)
 {
-  MetaBackgroundPrivate *priv;
   MetaBackgroundMonitor *monitor;
   MetaRectangle geometry;
   cairo_rectangle_int_t monitor_area;
   CoglTexture *texture1, *texture2;
 
   g_return_val_if_fail (META_IS_BACKGROUND (self), NULL);
-  priv = self->priv;
-  g_return_val_if_fail (monitor_index >= 0 && monitor_index < priv->n_monitors, NULL);
+  g_return_val_if_fail (monitor_index >= 0 && monitor_index < self->n_monitors, NULL);
 
-  monitor = &priv->monitors[monitor_index];
+  monitor = &self->monitors[monitor_index];
 
-  meta_display_get_monitor_geometry (priv->display, monitor_index, &geometry);
+  meta_display_get_monitor_geometry (self->display, monitor_index, &geometry);
   monitor_area.x = geometry.x;
   monitor_area.y = geometry.y;
   monitor_area.width = geometry.width;
   monitor_area.height = geometry.height;
 
-  texture1 = priv->background_image1 ? meta_background_image_get_texture (priv->background_image1) : NULL;
-  texture2 = priv->background_image2 ? meta_background_image_get_texture (priv->background_image2) : NULL;
+  texture1 = self->background_image1 ? meta_background_image_get_texture (self->background_image1) : NULL;
+  texture2 = self->background_image2 ? meta_background_image_get_texture (self->background_image2) : NULL;
 
   if (texture1 == NULL && texture2 == NULL)
     {
@@ -766,19 +743,19 @@ meta_background_get_texture (MetaBackground         *self,
         set_texture_area_from_monitor_area (&monitor_area, texture_area);
       if (wrap_mode)
         *wrap_mode = COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE;
-      return priv->color_texture;
+      return self->color_texture;
     }
 
-  if (texture2 == NULL && priv->style == G_DESKTOP_BACKGROUND_STYLE_WALLPAPER &&
-      priv->shading_direction == G_DESKTOP_BACKGROUND_SHADING_SOLID &&
+  if (texture2 == NULL && self->style == G_DESKTOP_BACKGROUND_STYLE_WALLPAPER &&
+      self->shading_direction == G_DESKTOP_BACKGROUND_SHADING_SOLID &&
       ensure_wallpaper_texture (self, texture1))
     {
       if (texture_area)
-        get_texture_area (self, &monitor_area, priv->wallpaper_texture,
+        get_texture_area (self, &monitor_area, self->wallpaper_texture,
                           texture_area);
       if (wrap_mode)
         *wrap_mode = COGL_PIPELINE_WRAP_MODE_REPEAT;
-      return priv->wallpaper_texture;
+      return self->wallpaper_texture;
     }
 
   if (monitor->dirty)
@@ -815,13 +792,13 @@ meta_background_get_texture (MetaBackground         *self,
       cogl_framebuffer_orthographic (monitor->fbo, 0, 0,
                                      monitor_area.width, monitor_area.height, -1., 1.);
 
-      if (texture2 != NULL && priv->blend_factor != 0.0)
+      if (texture2 != NULL && self->blend_factor != 0.0)
         {
           CoglPipeline *pipeline = create_pipeline (PIPELINE_REPLACE);
           cogl_pipeline_set_color4f (pipeline,
-                                      priv->blend_factor, priv->blend_factor, priv->blend_factor, 
priv->blend_factor);
+                                      self->blend_factor, self->blend_factor, self->blend_factor, 
self->blend_factor);
           cogl_pipeline_set_layer_texture (pipeline, 0, texture2);
-          cogl_pipeline_set_layer_wrap_mode (pipeline, 0, get_wrap_mode (priv->style));
+          cogl_pipeline_set_layer_wrap_mode (pipeline, 0, get_wrap_mode (self->style));
 
           bare_region_visible = draw_texture (self,
                                               monitor->fbo, pipeline,
@@ -836,16 +813,16 @@ meta_background_get_texture (MetaBackground         *self,
                                     0.0, 0.0, 0.0, 0.0);
         }
 
-      if (texture1 != NULL && priv->blend_factor != 1.0)
+      if (texture1 != NULL && self->blend_factor != 1.0)
         {
           CoglPipeline *pipeline = create_pipeline (PIPELINE_ADD);
           cogl_pipeline_set_color4f (pipeline,
-                                     (1 - priv->blend_factor),
-                                     (1 - priv->blend_factor),
-                                     (1 - priv->blend_factor),
-                                     (1 - priv->blend_factor));;
+                                     (1 - self->blend_factor),
+                                     (1 - self->blend_factor),
+                                     (1 - self->blend_factor),
+                                     (1 - self->blend_factor));;
           cogl_pipeline_set_layer_texture (pipeline, 0, texture1);
-          cogl_pipeline_set_layer_wrap_mode (pipeline, 0, get_wrap_mode (priv->style));
+          cogl_pipeline_set_layer_wrap_mode (pipeline, 0, get_wrap_mode (self->style));
 
           bare_region_visible = bare_region_visible || draw_texture (self,
                                                                      monitor->fbo, pipeline,
@@ -859,7 +836,7 @@ meta_background_get_texture (MetaBackground         *self,
           CoglPipeline *pipeline = create_pipeline (PIPELINE_OVER_REVERSE);
 
           ensure_color_texture (self);
-          cogl_pipeline_set_layer_texture (pipeline, 0, priv->color_texture);
+          cogl_pipeline_set_layer_texture (pipeline, 0, self->color_texture);
           cogl_framebuffer_draw_rectangle (monitor->fbo,
                                            pipeline,
                                            0, 0,
@@ -906,17 +883,13 @@ meta_background_set_gradient (MetaBackground            *self,
                               ClutterColor              *color,
                               ClutterColor              *second_color)
 {
-  MetaBackgroundPrivate *priv;
-
   g_return_if_fail (META_IS_BACKGROUND (self));
   g_return_if_fail (color != NULL);
   g_return_if_fail (second_color != NULL);
 
-  priv = self->priv;
-
-  priv->shading_direction = shading_direction;
-  priv->color = *color;
-  priv->second_color = *second_color;
+  self->shading_direction = shading_direction;
+  self->color = *color;
+  self->second_color = *second_color;
 
   free_color_texture (self);
   free_wallpaper_texture (self);
@@ -940,18 +913,14 @@ meta_background_set_blend (MetaBackground          *self,
                            double                   blend_factor,
                            GDesktopBackgroundStyle  style)
 {
-  MetaBackgroundPrivate *priv;
-
   g_return_if_fail (META_IS_BACKGROUND (self));
   g_return_if_fail (blend_factor >= 0.0 && blend_factor <= 1.0);
 
-  priv = self->priv;
-
-  set_file (self, &priv->file1, &priv->background_image1, file1);
-  set_file (self, &priv->file2, &priv->background_image2, file2);
+  set_file (self, &self->file1, &self->background_image1, file1);
+  set_file (self, &self->file2, &self->background_image2, file2);
 
-  priv->blend_factor = blend_factor;
-  priv->style = style;
+  self->blend_factor = blend_factor;
+  self->style = style;
 
   free_wallpaper_texture (self);
   mark_changed (self);
diff --git a/src/compositor/meta-cullable.h b/src/compositor/meta-cullable.h
index d7fe6e483..fc1720c8d 100644
--- a/src/compositor/meta-cullable.h
+++ b/src/compositor/meta-cullable.h
@@ -29,13 +29,8 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_CULLABLE             (meta_cullable_get_type ())
-#define META_CULLABLE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CULLABLE, MetaCullable))
-#define META_IS_CULLABLE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_CULLABLE))
-#define META_CULLABLE_GET_IFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE ((obj),  META_TYPE_CULLABLE, 
MetaCullableInterface))
-
-typedef struct _MetaCullable MetaCullable;
-typedef struct _MetaCullableInterface MetaCullableInterface;
+#define META_TYPE_CULLABLE (meta_cullable_get_type ())
+G_DECLARE_INTERFACE (MetaCullable, meta_cullable, META, CULLABLE, ClutterActor)
 
 struct _MetaCullableInterface
 {
@@ -47,8 +42,6 @@ struct _MetaCullableInterface
   void (* reset_culling) (MetaCullable  *cullable);
 };
 
-GType meta_cullable_get_type (void);
-
 void meta_cullable_cull_out (MetaCullable   *cullable,
                              cairo_region_t *unobscured_region,
                              cairo_region_t *clip_region);
diff --git a/src/compositor/meta-dnd-actor-private.h b/src/compositor/meta-dnd-actor-private.h
index f7ad91acc..20be369eb 100644
--- a/src/compositor/meta-dnd-actor-private.h
+++ b/src/compositor/meta-dnd-actor-private.h
@@ -31,28 +31,12 @@
  * This class handles the rendering of the DnD surface
  */
 
-#define META_TYPE_DND_ACTOR            (meta_dnd_actor_get_type ())
-#define META_DND_ACTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_DND_ACTOR, 
MetaDnDActor))
-#define META_DND_ACTOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_DND_ACTOR, 
MetaDnDActorClass))
-#define META_IS_DND_ACTOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_DND_ACTOR))
-#define META_IS_DND_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_DND_ACTOR))
-#define META_DND_ACTOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_DND_ACTOR, 
MetaDnDActorClass))
+#define META_TYPE_DND_ACTOR (meta_dnd_actor_get_type ())
+G_DECLARE_FINAL_TYPE (MetaDnDActor,
+                      meta_dnd_actor,
+                      META, DND_ACTOR,
+                      MetaFeedbackActor)
 
-typedef struct _MetaDnDActor        MetaDnDActor;
-typedef struct _MetaDnDActorClass   MetaDnDActorClass;
-
-struct _MetaDnDActorClass
-{
-  /*< private >*/
-  MetaFeedbackActorClass parent_class;
-};
-
-struct _MetaDnDActor
-{
-  MetaFeedbackActor parent;
-};
-
-GType         meta_dnd_actor_get_type (void);
 
 ClutterActor *meta_dnd_actor_new (ClutterActor *drag_origin,
                                   int           start_x,
diff --git a/src/compositor/meta-dnd-actor.c b/src/compositor/meta-dnd-actor.c
index 24f578be1..d1e3c60ac 100644
--- a/src/compositor/meta-dnd-actor.c
+++ b/src/compositor/meta-dnd-actor.c
@@ -39,16 +39,16 @@ enum {
   PROP_DRAG_START_Y
 };
 
-typedef struct _MetaDnDActorPrivate MetaDnDActorPrivate;
-
-struct _MetaDnDActorPrivate
+struct _MetaDnDActor
 {
+  MetaFeedbackActor parent;
+
   ClutterActor *drag_origin;
   int drag_start_x;
   int drag_start_y;
 };
 
-G_DEFINE_TYPE_WITH_PRIVATE (MetaDnDActor, meta_dnd_actor, META_TYPE_FEEDBACK_ACTOR)
+G_DEFINE_TYPE (MetaDnDActor, meta_dnd_actor, META_TYPE_FEEDBACK_ACTOR)
 
 static void
 meta_dnd_actor_set_property (GObject      *object,
@@ -57,18 +57,17 @@ meta_dnd_actor_set_property (GObject      *object,
                              GParamSpec   *pspec)
 {
   MetaDnDActor *self = META_DND_ACTOR (object);
-  MetaDnDActorPrivate *priv = meta_dnd_actor_get_instance_private (self);
 
   switch (prop_id)
     {
     case PROP_DRAG_ORIGIN:
-      priv->drag_origin = g_value_get_object (value);
+      self->drag_origin = g_value_get_object (value);
       break;
     case PROP_DRAG_START_X:
-      priv->drag_start_x = g_value_get_int (value);
+      self->drag_start_x = g_value_get_int (value);
       break;
     case PROP_DRAG_START_Y:
-      priv->drag_start_y = g_value_get_int (value);
+      self->drag_start_y = g_value_get_int (value);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -83,18 +82,17 @@ meta_dnd_actor_get_property (GObject      *object,
                              GParamSpec   *pspec)
 {
   MetaDnDActor *self = META_DND_ACTOR (object);
-  MetaDnDActorPrivate *priv = meta_dnd_actor_get_instance_private (self);
 
   switch (prop_id)
     {
     case PROP_DRAG_ORIGIN:
-      g_value_set_object (value, priv->drag_origin);
+      g_value_set_object (value, self->drag_origin);
       break;
     case PROP_DRAG_START_X:
-      g_value_set_int (value, priv->drag_start_x);
+      g_value_set_int (value, self->drag_start_x);
       break;
     case PROP_DRAG_START_Y:
-      g_value_set_int (value, priv->drag_start_y);
+      g_value_set_int (value, self->drag_start_y);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -185,13 +183,11 @@ void
 meta_dnd_actor_drag_finish (MetaDnDActor *self,
                             gboolean      success)
 {
-  MetaDnDActorPrivate *priv;
   ClutterActor *actor;
 
   g_return_if_fail (META_IS_DND_ACTOR (self));
 
   actor = CLUTTER_ACTOR (self);
-  priv = meta_dnd_actor_get_instance_private (self);
 
   if (success)
     {
@@ -207,18 +203,18 @@ meta_dnd_actor_drag_finish (MetaDnDActor *self,
       clutter_actor_set_easing_duration (actor, DRAG_FAILED_DURATION);
       clutter_actor_set_opacity (actor, 0);
 
-      if (CLUTTER_ACTOR_IS_VISIBLE (priv->drag_origin))
+      if (CLUTTER_ACTOR_IS_VISIBLE (self->drag_origin))
         {
           int anchor_x, anchor_y;
           ClutterPoint dest;
 
-          clutter_actor_get_transformed_position (priv->drag_origin,
+          clutter_actor_get_transformed_position (self->drag_origin,
                                                   &dest.x, &dest.y);
           meta_feedback_actor_get_anchor (META_FEEDBACK_ACTOR (self),
                                           &anchor_x, &anchor_y);
 
-          dest.x += priv->drag_start_x - anchor_x;
-          dest.y += priv->drag_start_y - anchor_y;
+          dest.x += self->drag_start_x - anchor_x;
+          dest.y += self->drag_start_y - anchor_y;
           clutter_actor_set_position (actor, dest.x, dest.y);
         }
 
diff --git a/src/compositor/meta-feedback-actor-private.h b/src/compositor/meta-feedback-actor-private.h
index 6bccefd0c..6b1d2c8fc 100644
--- a/src/compositor/meta-feedback-actor-private.h
+++ b/src/compositor/meta-feedback-actor-private.h
@@ -31,15 +31,12 @@
  * This class handles the rendering of user interaction feedback
  */
 
-#define META_TYPE_FEEDBACK_ACTOR            (meta_feedback_actor_get_type ())
-#define META_FEEDBACK_ACTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_FEEDBACK_ACTOR, 
MetaFeedbackActor))
-#define META_FEEDBACK_ACTOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_FEEDBACK_ACTOR, 
MetaFeedbackActorClass))
-#define META_IS_FEEDBACK_ACTOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_FEEDBACK_ACTOR))
-#define META_IS_FEEDBACK_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_FEEDBACK_ACTOR))
-#define META_FEEDBACK_ACTOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_FEEDBACK_ACTOR, 
MetaFeedbackActorClass))
+#define META_TYPE_FEEDBACK_ACTOR (meta_feedback_actor_get_type ())
+G_DECLARE_DERIVABLE_TYPE (MetaFeedbackActor,
+                          meta_feedback_actor,
+                          META, FEEDBACK_ACTOR,
+                          ClutterActor)
 
-typedef struct _MetaFeedbackActor        MetaFeedbackActor;
-typedef struct _MetaFeedbackActorClass   MetaFeedbackActorClass;
 
 struct _MetaFeedbackActorClass
 {
@@ -47,12 +44,6 @@ struct _MetaFeedbackActorClass
   ClutterActorClass parent_class;
 };
 
-struct _MetaFeedbackActor
-{
-  ClutterActor parent;
-};
-
-GType meta_feedback_actor_get_type (void);
 
 ClutterActor *meta_feedback_actor_new (int anchor_x,
                                        int anchor_y);
diff --git a/src/compositor/meta-feedback-actor.c b/src/compositor/meta-feedback-actor.c
index 0e98faba7..34d0adcd2 100644
--- a/src/compositor/meta-feedback-actor.c
+++ b/src/compositor/meta-feedback-actor.c
@@ -35,15 +35,13 @@ enum {
   PROP_ANCHOR_Y
 };
 
-typedef struct _MetaFeedbackActorPrivate MetaFeedbackActorPrivate;
-
-struct _MetaFeedbackActorPrivate
+typedef struct _MetaFeedbackActorPrivate
 {
   int anchor_x;
   int anchor_y;
   int pos_x;
   int pos_y;
-};
+} MetaFeedbackActorPrivate;
 
 G_DEFINE_TYPE_WITH_PRIVATE (MetaFeedbackActor, meta_feedback_actor, CLUTTER_TYPE_ACTOR)
 
diff --git a/src/compositor/meta-shadow-factory.c b/src/compositor/meta-shadow-factory.c
index ab358dd6d..ddfa44cd6 100644
--- a/src/compositor/meta-shadow-factory.c
+++ b/src/compositor/meta-shadow-factory.c
@@ -22,7 +22,15 @@
  * @short_description: Create and cache shadow textures for abritrary window shapes
  */
 
-#include "config.h"
+/**
+ * MetaShadowFactory:
+ *
+ * #MetaShadowFactory is used to create window shadows. It caches shadows internally
+ * so that multiple shadows created for the same shape with the same radius will
+ * share the same MetaShadow.
+ */
+
+#include <config.h>
 
 #include <math.h>
 #include <string.h>
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index 919e7a9b5..2e539482d 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -70,10 +70,6 @@ static gboolean meta_shaped_texture_get_paint_volume (ClutterActor *self, Clutte
 
 static void cullable_iface_init (MetaCullableInterface *iface);
 
-#define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \
-  (G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \
-                                MetaShapedTexturePrivate))
-
 enum {
   SIZE_CHANGED,
 
@@ -82,8 +78,16 @@ enum {
 
 static guint signals[LAST_SIGNAL];
 
-struct _MetaShapedTexturePrivate
+/**
+ * MetaShapedTexture:
+ *
+ * The <structname>MetaShapedTexture</structname> structure contains
+ * only private data and should be accessed using the provided API
+ */
+struct _MetaShapedTexture
 {
+  ClutterActor parent;
+
   MetaTextureTower *paint_tower;
 
   CoglTexture *texture;
@@ -115,7 +119,6 @@ struct _MetaShapedTexturePrivate
 };
 
 G_DEFINE_TYPE_WITH_CODE (MetaShapedTexture, meta_shaped_texture, CLUTTER_TYPE_ACTOR,
-                         G_ADD_PRIVATE (MetaShapedTexture)
                          G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
 
 static void
@@ -142,43 +145,37 @@ meta_shaped_texture_class_init (MetaShapedTextureClass *klass)
 static void
 meta_shaped_texture_init (MetaShapedTexture *self)
 {
-  MetaShapedTexturePrivate *priv;
-
-  priv = self->priv = META_SHAPED_TEXTURE_GET_PRIVATE (self);
+  self->paint_tower = meta_texture_tower_new ();
 
-  priv->paint_tower = meta_texture_tower_new ();
-
-  priv->texture = NULL;
-  priv->mask_texture = NULL;
-  priv->create_mipmaps = TRUE;
-  priv->is_y_inverted = TRUE;
+  self->texture = NULL;
+  self->mask_texture = NULL;
+  self->create_mipmaps = TRUE;
+  self->is_y_inverted = TRUE;
 }
 
 static void
 set_unobscured_region (MetaShapedTexture *self,
                        cairo_region_t    *unobscured_region)
 {
-  MetaShapedTexturePrivate *priv = self->priv;
-
-  g_clear_pointer (&priv->unobscured_region, cairo_region_destroy);
+  g_clear_pointer (&self->unobscured_region, cairo_region_destroy);
   if (unobscured_region)
     {
       int width, height;
 
-      if (priv->texture)
+      if (self->texture)
         {
-          width = priv->tex_width;
-          height = priv->tex_height;
+          width = self->tex_width;
+          height = self->tex_height;
         }
       else
         {
-          width = priv->fallback_width;
-          height = priv->fallback_height;
+          width = self->fallback_width;
+          height = self->fallback_height;
         }
 
       cairo_rectangle_int_t bounds = { 0, 0, width, height };
-      priv->unobscured_region = cairo_region_copy (unobscured_region);
-      cairo_region_intersect_rectangle (priv->unobscured_region, &bounds);
+      self->unobscured_region = cairo_region_copy (unobscured_region);
+      cairo_region_intersect_rectangle (self->unobscured_region, &bounds);
     }
 }
 
@@ -186,41 +183,36 @@ static void
 set_clip_region (MetaShapedTexture *self,
                  cairo_region_t    *clip_region)
 {
-  MetaShapedTexturePrivate *priv = self->priv;
-
-  g_clear_pointer (&priv->clip_region, cairo_region_destroy);
+  g_clear_pointer (&self->clip_region, cairo_region_destroy);
   if (clip_region)
-    priv->clip_region = cairo_region_copy (clip_region);
+    self->clip_region = cairo_region_copy (clip_region);
 }
 
 static void
-meta_shaped_texture_reset_pipelines (MetaShapedTexture *stex)
+meta_shaped_texture_reset_pipelines (MetaShapedTexture *self)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
-
-  g_clear_pointer (&priv->base_pipeline, cogl_object_unref);
-  g_clear_pointer (&priv->masked_pipeline, cogl_object_unref);
-  g_clear_pointer (&priv->unblended_pipeline, cogl_object_unref);
+  g_clear_pointer (&self->base_pipeline, cogl_object_unref);
+  g_clear_pointer (&self->masked_pipeline, cogl_object_unref);
+  g_clear_pointer (&self->unblended_pipeline, cogl_object_unref);
 }
 
 static void
 meta_shaped_texture_dispose (GObject *object)
 {
   MetaShapedTexture *self = (MetaShapedTexture *) object;
-  MetaShapedTexturePrivate *priv = self->priv;
 
-  if (priv->remipmap_timeout_id)
+  if (self->remipmap_timeout_id)
     {
-      g_source_remove (priv->remipmap_timeout_id);
-      priv->remipmap_timeout_id = 0;
+      g_source_remove (self->remipmap_timeout_id);
+      self->remipmap_timeout_id = 0;
     }
 
-  if (priv->paint_tower)
-    meta_texture_tower_free (priv->paint_tower);
-  priv->paint_tower = NULL;
+  if (self->paint_tower)
+    meta_texture_tower_free (self->paint_tower);
+  self->paint_tower = NULL;
 
-  g_clear_pointer (&priv->texture, cogl_object_unref);
-  g_clear_pointer (&priv->opaque_region, cairo_region_destroy);
+  g_clear_pointer (&self->texture, cogl_object_unref);
+  g_clear_pointer (&self->opaque_region, cairo_region_destroy);
 
   meta_shaped_texture_set_mask_texture (self, NULL);
   set_unobscured_region (self, NULL);
@@ -228,20 +220,19 @@ meta_shaped_texture_dispose (GObject *object)
 
   meta_shaped_texture_reset_pipelines (self);
 
-  g_clear_pointer (&priv->snippet, cogl_object_unref);
+  g_clear_pointer (&self->snippet, cogl_object_unref);
 
   G_OBJECT_CLASS (meta_shaped_texture_parent_class)->dispose (object);
 }
 
 static CoglPipeline *
-get_base_pipeline (MetaShapedTexture *stex,
+get_base_pipeline (MetaShapedTexture *self,
                    CoglContext       *ctx)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
   CoglPipeline *pipeline;
 
-  if (priv->base_pipeline)
-    return priv->base_pipeline;
+  if (self->base_pipeline)
+    return self->base_pipeline;
 
   pipeline = cogl_pipeline_new (ctx);
   cogl_pipeline_set_layer_wrap_mode_s (pipeline, 0,
@@ -252,7 +243,7 @@ get_base_pipeline (MetaShapedTexture *stex,
                                        COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
   cogl_pipeline_set_layer_wrap_mode_t (pipeline, 1,
                                        COGL_PIPELINE_WRAP_MODE_CLAMP_TO_EDGE);
-  if (!priv->is_y_inverted)
+  if (!self->is_y_inverted)
     {
       CoglMatrix matrix;
 
@@ -262,60 +253,58 @@ get_base_pipeline (MetaShapedTexture *stex,
       cogl_pipeline_set_layer_matrix (pipeline, 0, &matrix);
     }
 
-  if (priv->snippet)
-    cogl_pipeline_add_layer_snippet (pipeline, 0, priv->snippet);
+  if (self->snippet)
+    cogl_pipeline_add_layer_snippet (pipeline, 0, self->snippet);
 
-  priv->base_pipeline = pipeline;
+  self->base_pipeline = pipeline;
 
-  return priv->base_pipeline;
+  return self->base_pipeline;
 }
 
 static CoglPipeline *
-get_unmasked_pipeline (MetaShapedTexture *stex,
+get_unmasked_pipeline (MetaShapedTexture *self,
                        CoglContext       *ctx)
 {
-  return get_base_pipeline (stex, ctx);
+  return get_base_pipeline (self, ctx);
 }
 
 static CoglPipeline *
-get_masked_pipeline (MetaShapedTexture *stex,
+get_masked_pipeline (MetaShapedTexture *self,
                      CoglContext       *ctx)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
   CoglPipeline *pipeline;
 
-  if (priv->masked_pipeline)
-    return priv->masked_pipeline;
+  if (self->masked_pipeline)
+    return self->masked_pipeline;
 
-  pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+  pipeline = cogl_pipeline_copy (get_base_pipeline (self, ctx));
   cogl_pipeline_set_layer_combine (pipeline, 1,
                                    "RGBA = MODULATE (PREVIOUS, TEXTURE[A])",
                                    NULL);
 
-  priv->masked_pipeline = pipeline;
+  self->masked_pipeline = pipeline;
 
   return pipeline;
 }
 
 static CoglPipeline *
-get_unblended_pipeline (MetaShapedTexture *stex,
+get_unblended_pipeline (MetaShapedTexture *self,
                         CoglContext       *ctx)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
   CoglPipeline *pipeline;
   CoglColor color;
 
-  if (priv->unblended_pipeline)
-    return priv->unblended_pipeline;
+  if (self->unblended_pipeline)
+    return self->unblended_pipeline;
 
-  pipeline = cogl_pipeline_copy (get_base_pipeline (stex, ctx));
+  pipeline = cogl_pipeline_copy (get_base_pipeline (self, ctx));
   cogl_color_init_from_4ub (&color, 255, 255, 255, 255);
   cogl_pipeline_set_blend (pipeline,
                            "RGBA = ADD (SRC_COLOR, 0)",
                            NULL);
   cogl_pipeline_set_color (pipeline, &color);
 
-  priv->unblended_pipeline = pipeline;
+  self->unblended_pipeline = pipeline;
 
   return pipeline;
 }
@@ -350,20 +339,17 @@ paint_clipped_rectangle (CoglFramebuffer       *fb,
 }
 
 static void
-set_cogl_texture (MetaShapedTexture *stex,
+set_cogl_texture (MetaShapedTexture *self,
                   CoglTexture       *cogl_tex)
 {
-  MetaShapedTexturePrivate *priv;
   int width, height;
 
-  g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
-
-  priv = stex->priv;
+  g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
 
-  if (priv->texture)
-    cogl_object_unref (priv->texture);
+  if (self->texture)
+    cogl_object_unref (self->texture);
 
-  priv->texture = cogl_tex;
+  self->texture = cogl_tex;
 
   if (cogl_tex != NULL)
     {
@@ -377,14 +363,14 @@ set_cogl_texture (MetaShapedTexture *stex,
       height = 0;
     }
 
-  if (priv->tex_width != width ||
-      priv->tex_height != height)
+  if (self->tex_width != width ||
+      self->tex_height != height)
     {
-      priv->tex_width = width;
-      priv->tex_height = height;
-      meta_shaped_texture_set_mask_texture (stex, NULL);
-      clutter_actor_queue_relayout (CLUTTER_ACTOR (stex));
-      g_signal_emit (stex, signals[SIZE_CHANGED], 0);
+      self->tex_width = width;
+      self->tex_height = height;
+      meta_shaped_texture_set_mask_texture (self, NULL);
+      clutter_actor_queue_relayout (CLUTTER_ACTOR (self));
+      g_signal_emit (self, signals[SIZE_CHANGED], 0);
     }
 
   /* NB: We don't queue a redraw of the actor here because we don't
@@ -392,21 +378,20 @@ set_cogl_texture (MetaShapedTexture *stex,
    * previous buffer. We only queue a redraw in response to surface
    * damage. */
 
-  if (priv->create_mipmaps)
-    meta_texture_tower_set_base_texture (priv->paint_tower, cogl_tex);
+  if (self->create_mipmaps)
+    meta_texture_tower_set_base_texture (self->paint_tower, cogl_tex);
 }
 
 static gboolean
 texture_is_idle_and_not_mipmapped (gpointer user_data)
 {
-  MetaShapedTexture *stex = META_SHAPED_TEXTURE (user_data);
-  MetaShapedTexturePrivate *priv = stex->priv;
+  MetaShapedTexture *self = META_SHAPED_TEXTURE (user_data);
 
-  if ((g_get_monotonic_time () - priv->earliest_remipmap) < 0)
+  if ((g_get_monotonic_time () - self->earliest_remipmap) < 0)
     return G_SOURCE_CONTINUE;
 
-  clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
-  priv->remipmap_timeout_id = 0;
+  clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
+  self->remipmap_timeout_id = 0;
 
   return G_SOURCE_REMOVE;
 }
@@ -414,8 +399,7 @@ texture_is_idle_and_not_mipmapped (gpointer user_data)
 static void
 meta_shaped_texture_paint (ClutterActor *actor)
 {
-  MetaShapedTexture *stex = (MetaShapedTexture *) actor;
-  MetaShapedTexturePrivate *priv = stex->priv;
+  MetaShapedTexture *self = (MetaShapedTexture *) actor;
   double tex_scale;
   int tex_width, tex_height;
   cairo_rectangle_int_t tex_rect;
@@ -431,11 +415,11 @@ meta_shaped_texture_paint (ClutterActor *actor)
   CoglPipelineFilter filter;
   gint64 now = g_get_monotonic_time ();
 
-  if (priv->clip_region && cairo_region_is_empty (priv->clip_region))
+  if (self->clip_region && cairo_region_is_empty (self->clip_region))
     return;
 
-  if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (stex)))
-    clutter_actor_realize (CLUTTER_ACTOR (stex));
+  if (!CLUTTER_ACTOR_IS_REALIZED (CLUTTER_ACTOR (self)))
+    clutter_actor_realize (CLUTTER_ACTOR (self));
 
   /* The GL EXT_texture_from_pixmap extension does allow for it to be
    * used together with SGIS_generate_mipmap, however this is very
@@ -452,38 +436,38 @@ meta_shaped_texture_paint (ClutterActor *actor)
    * Setting the texture quality to high without SGIS_generate_mipmap
    * support for TFP textures will result in fallbacks to XGetImage.
    */
-  if (priv->create_mipmaps && priv->last_invalidation)
+  if (self->create_mipmaps && self->last_invalidation)
     {
-      gint64 age = now - priv->last_invalidation;
+      gint64 age = now - self->last_invalidation;
 
       if (age >= MIN_MIPMAP_AGE_USEC ||
-          priv->fast_updates < MIN_FAST_UPDATES_BEFORE_UNMIPMAP)
-        paint_tex = meta_texture_tower_get_paint_texture (priv->paint_tower);
+          self->fast_updates < MIN_FAST_UPDATES_BEFORE_UNMIPMAP)
+        paint_tex = meta_texture_tower_get_paint_texture (self->paint_tower);
     }
 
   if (paint_tex == NULL)
     {
-      paint_tex = COGL_TEXTURE (priv->texture);
+      paint_tex = COGL_TEXTURE (self->texture);
 
       if (paint_tex == NULL)
         return;
 
-      if (priv->create_mipmaps)
+      if (self->create_mipmaps)
         {
           /* Minus 1000 to ensure we don't fail the age test in timeout */
-          priv->earliest_remipmap = now + MIN_MIPMAP_AGE_USEC - 1000;
+          self->earliest_remipmap = now + MIN_MIPMAP_AGE_USEC - 1000;
 
-          if (!priv->remipmap_timeout_id)
-            priv->remipmap_timeout_id =
+          if (!self->remipmap_timeout_id)
+            self->remipmap_timeout_id =
               g_timeout_add (MIN_MIPMAP_AGE_USEC / 1000,
                              texture_is_idle_and_not_mipmapped,
-                             stex);
+                             self);
         }
     }
 
   clutter_actor_get_scale (actor, &tex_scale, NULL);
-  tex_width = priv->tex_width;
-  tex_height = priv->tex_height;
+  tex_width = self->tex_width;
+  tex_height = self->tex_height;
 
   if (tex_width == 0 || tex_height == 0) /* no contents yet */
     return;
@@ -505,10 +489,10 @@ meta_shaped_texture_paint (ClutterActor *actor)
   opacity = clutter_actor_get_paint_opacity (actor);
   clutter_actor_get_allocation_box (actor, &alloc);
 
-  if (priv->opaque_region && opacity == 255)
+  if (self->opaque_region && opacity == 255)
     {
       opaque_tex_region =
-        meta_region_scale_double (priv->opaque_region,
+        meta_region_scale_double (self->opaque_region,
                                   1.0 / tex_scale,
                                   META_ROUNDING_STRATEGY_SHRINK);
       use_opaque_region = TRUE;
@@ -519,10 +503,10 @@ meta_shaped_texture_paint (ClutterActor *actor)
       use_opaque_region = FALSE;
     }
 
-  if (priv->clip_region)
+  if (self->clip_region)
     {
       clip_tex_region =
-        meta_region_scale_double (priv->clip_region,
+        meta_region_scale_double (self->clip_region,
                                   1.0 / tex_scale,
                                   META_ROUNDING_STRATEGY_GROW);
     }
@@ -584,7 +568,7 @@ meta_shaped_texture_paint (ClutterActor *actor)
 
       if (!cairo_region_is_empty (region))
         {
-          opaque_pipeline = get_unblended_pipeline (stex, ctx);
+          opaque_pipeline = get_unblended_pipeline (self, ctx);
           cogl_pipeline_set_layer_texture (opaque_pipeline, 0, paint_tex);
           cogl_pipeline_set_layer_filters (opaque_pipeline, 0, filter, filter);
 
@@ -614,14 +598,14 @@ meta_shaped_texture_paint (ClutterActor *actor)
     {
       CoglPipeline *blended_pipeline;
 
-      if (priv->mask_texture == NULL)
+      if (self->mask_texture == NULL)
         {
-          blended_pipeline = get_unmasked_pipeline (stex, ctx);
+          blended_pipeline = get_unmasked_pipeline (self, ctx);
         }
       else
         {
-          blended_pipeline = get_masked_pipeline (stex, ctx);
-          cogl_pipeline_set_layer_texture (blended_pipeline, 1, priv->mask_texture);
+          blended_pipeline = get_masked_pipeline (self, ctx);
+          cogl_pipeline_set_layer_texture (blended_pipeline, 1, self->mask_texture);
           cogl_pipeline_set_layer_filters (blended_pipeline, 1, filter, filter);
         }
 
@@ -665,18 +649,18 @@ meta_shaped_texture_paint (ClutterActor *actor)
 }
 
 static void
-meta_shaped_texture_get_preferred_width (ClutterActor *self,
+meta_shaped_texture_get_preferred_width (ClutterActor *actor,
                                          gfloat        for_height,
                                          gfloat       *min_width_p,
                                          gfloat       *natural_width_p)
 {
-  MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
+  MetaShapedTexture *self = META_SHAPED_TEXTURE (actor);
   int width;
 
-  if (priv->texture)
-    width = priv->tex_width;
+  if (self->texture)
+    width = self->tex_width;
   else
-    width = priv->fallback_width;
+    width = self->fallback_width;
 
   if (min_width_p)
     *min_width_p = width;
@@ -685,18 +669,18 @@ meta_shaped_texture_get_preferred_width (ClutterActor *self,
 }
 
 static void
-meta_shaped_texture_get_preferred_height (ClutterActor *self,
+meta_shaped_texture_get_preferred_height (ClutterActor *actor,
                                           gfloat        for_width,
                                           gfloat       *min_height_p,
                                           gfloat       *natural_height_p)
 {
-  MetaShapedTexturePrivate *priv = META_SHAPED_TEXTURE (self)->priv;
+  MetaShapedTexture *self = META_SHAPED_TEXTURE (actor);
   int height;
 
-  if (priv->texture)
-    height = priv->tex_height;
+  if (self->texture)
+    height = self->tex_height;
   else
-    height = priv->fallback_height;
+    height = self->fallback_height;
 
   if (min_height_p)
     *min_height_p = height;
@@ -707,7 +691,6 @@ meta_shaped_texture_get_preferred_height (ClutterActor *self,
 static cairo_region_t *
 effective_unobscured_region (MetaShapedTexture *self)
 {
-  MetaShapedTexturePrivate *priv = self->priv;
   ClutterActor *actor;
 
   /* Fail if we have any mapped clones. */
@@ -720,7 +703,7 @@ effective_unobscured_region (MetaShapedTexture *self)
     }
   while (actor != NULL);
 
-  return priv->unobscured_region;
+  return self->unobscured_region;
 }
 
 static gboolean
@@ -731,45 +714,37 @@ meta_shaped_texture_get_paint_volume (ClutterActor *actor,
 }
 
 void
-meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
+meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *self,
                                        gboolean           create_mipmaps)
 {
-  MetaShapedTexturePrivate *priv;
-
-  g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
-
-  priv = stex->priv;
+  g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
 
   create_mipmaps = create_mipmaps != FALSE;
 
-  if (create_mipmaps != priv->create_mipmaps)
+  if (create_mipmaps != self->create_mipmaps)
     {
       CoglTexture *base_texture;
-      priv->create_mipmaps = create_mipmaps;
-      base_texture = create_mipmaps ? priv->texture : NULL;
-      meta_texture_tower_set_base_texture (priv->paint_tower, base_texture);
+      self->create_mipmaps = create_mipmaps;
+      base_texture = create_mipmaps ? self->texture : NULL;
+      meta_texture_tower_set_base_texture (self->paint_tower, base_texture);
     }
 }
 
 void
-meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
+meta_shaped_texture_set_mask_texture (MetaShapedTexture *self,
                                       CoglTexture       *mask_texture)
 {
-  MetaShapedTexturePrivate *priv;
-
-  g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
-
-  priv = stex->priv;
+  g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
 
-  g_clear_pointer (&priv->mask_texture, cogl_object_unref);
+  g_clear_pointer (&self->mask_texture, cogl_object_unref);
 
   if (mask_texture != NULL)
     {
-      priv->mask_texture = mask_texture;
-      cogl_object_ref (priv->mask_texture);
+      self->mask_texture = mask_texture;
+      cogl_object_ref (self->mask_texture);
     }
 
-  clutter_actor_queue_redraw (CLUTTER_ACTOR (stex));
+  clutter_actor_queue_redraw (CLUTTER_ACTOR (self));
 }
 
 gboolean
@@ -785,7 +760,7 @@ meta_shaped_texture_is_obscured (MetaShapedTexture *self)
 
 /**
  * meta_shaped_texture_update_area:
- * @stex: #MetaShapedTexture
+ * @self: #MetaShapedTexture
  * @x: the x coordinate of the damaged area
  * @y: the y coordinate of the damaged area
  * @width: the width of the damaged area
@@ -797,38 +772,35 @@ meta_shaped_texture_is_obscured (MetaShapedTexture *self)
  * Return value: Whether a redraw have been queued or not
  */
 gboolean
-meta_shaped_texture_update_area (MetaShapedTexture *stex,
+meta_shaped_texture_update_area (MetaShapedTexture *self,
                                 int                x,
                                 int                y,
                                 int                width,
                                 int                height)
 {
-  MetaShapedTexturePrivate *priv;
   cairo_region_t *unobscured_region;
   const cairo_rectangle_int_t clip = { x, y, width, height };
 
-  priv = stex->priv;
-
-  if (priv->texture == NULL)
+  if (self->texture == NULL)
     return FALSE;
 
-  meta_texture_tower_update_area (priv->paint_tower, x, y, width, height);
+  meta_texture_tower_update_area (self->paint_tower, x, y, width, height);
 
-  priv->prev_invalidation = priv->last_invalidation;
-  priv->last_invalidation = g_get_monotonic_time ();
+  self->prev_invalidation = self->last_invalidation;
+  self->last_invalidation = g_get_monotonic_time ();
 
-  if (priv->prev_invalidation)
+  if (self->prev_invalidation)
     {
-      gint64 interval = priv->last_invalidation - priv->prev_invalidation;
+      gint64 interval = self->last_invalidation - self->prev_invalidation;
       gboolean fast_update = interval < MIN_MIPMAP_AGE_USEC;
 
       if (!fast_update)
-        priv->fast_updates = 0;
-      else if (priv->fast_updates < MIN_FAST_UPDATES_BEFORE_UNMIPMAP)
-        priv->fast_updates++;
+        self->fast_updates = 0;
+      else if (self->fast_updates < MIN_FAST_UPDATES_BEFORE_UNMIPMAP)
+        self->fast_updates++;
     }
 
-  unobscured_region = effective_unobscured_region (stex);
+  unobscured_region = effective_unobscured_region (self);
   if (unobscured_region)
     {
       cairo_region_t *intersection;
@@ -843,7 +815,7 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
         {
           cairo_rectangle_int_t damage_rect;
           cairo_region_get_extents (intersection, &damage_rect);
-          clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &damage_rect);
+          clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (self), &damage_rect);
           cairo_region_destroy (intersection);
           return TRUE;
         }
@@ -853,77 +825,73 @@ meta_shaped_texture_update_area (MetaShapedTexture *stex,
     }
   else
     {
-      clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (stex), &clip);
+      clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (self), &clip);
       return TRUE;
     }
 }
 
 /**
  * meta_shaped_texture_set_texture:
- * @stex: The #MetaShapedTexture
+ * @self: The #MetaShapedTexture
  * @pixmap: The #CoglTexture to display
  */
 void
-meta_shaped_texture_set_texture (MetaShapedTexture *stex,
+meta_shaped_texture_set_texture (MetaShapedTexture *self,
                                  CoglTexture       *texture)
 {
-  g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
+  g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
 
-  set_cogl_texture (stex, texture);
+  set_cogl_texture (self, texture);
 }
 
 /**
  * meta_shaped_texture_set_is_y_inverted: (skip)
  */
 void
-meta_shaped_texture_set_is_y_inverted (MetaShapedTexture *stex,
+meta_shaped_texture_set_is_y_inverted (MetaShapedTexture *self,
                                        gboolean           is_y_inverted)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
-
-  if (priv->is_y_inverted == is_y_inverted)
+  if (self->is_y_inverted == is_y_inverted)
     return;
 
-  meta_shaped_texture_reset_pipelines (stex);
+  meta_shaped_texture_reset_pipelines (self);
 
-  priv->is_y_inverted = is_y_inverted;
+  self->is_y_inverted = is_y_inverted;
 }
 
 /**
  * meta_shaped_texture_set_snippet: (skip)
  */
 void
-meta_shaped_texture_set_snippet (MetaShapedTexture *stex,
+meta_shaped_texture_set_snippet (MetaShapedTexture *self,
                                  CoglSnippet       *snippet)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
-
-  if (priv->snippet == snippet)
+  if (self->snippet == snippet)
     return;
 
-  meta_shaped_texture_reset_pipelines (stex);
+  meta_shaped_texture_reset_pipelines (self);
 
-  g_clear_pointer (&priv->snippet, cogl_object_unref);
+  g_clear_pointer (&self->snippet, cogl_object_unref);
   if (snippet)
-    priv->snippet = cogl_object_ref (snippet);
+    self->snippet = cogl_object_ref (snippet);
 }
 
 /**
  * meta_shaped_texture_get_texture:
- * @stex: The #MetaShapedTexture
+ * @self: The #MetaShapedTexture
  *
  * Returns: (transfer none): the unshaped texture
  */
 CoglTexture *
-meta_shaped_texture_get_texture (MetaShapedTexture *stex)
+meta_shaped_texture_get_texture (MetaShapedTexture *self)
 {
-  g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
-  return COGL_TEXTURE (stex->priv->texture);
+  g_return_val_if_fail (META_IS_SHAPED_TEXTURE (self), NULL);
+  return COGL_TEXTURE (self->texture);
 }
 
 /**
  * meta_shaped_texture_set_opaque_region:
- * @stex: a #MetaShapedTexture
+ * @self: a #MetaShapedTexture
  * @opaque_region: (transfer full): the region of the texture that
  *   can have blending turned off.
  *
@@ -933,34 +901,29 @@ meta_shaped_texture_get_texture (MetaShapedTexture *stex)
  * optimization purposes.
  */
 void
-meta_shaped_texture_set_opaque_region (MetaShapedTexture *stex,
+meta_shaped_texture_set_opaque_region (MetaShapedTexture *self,
                                        cairo_region_t    *opaque_region)
 {
-  MetaShapedTexturePrivate *priv;
-
-  g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
+  g_return_if_fail (META_IS_SHAPED_TEXTURE (self));
 
-  priv = stex->priv;
-
-  if (priv->opaque_region)
-    cairo_region_destroy (priv->opaque_region);
+  if (self->opaque_region)
+    cairo_region_destroy (self->opaque_region);
 
   if (opaque_region)
-    priv->opaque_region = cairo_region_reference (opaque_region);
+    self->opaque_region = cairo_region_reference (opaque_region);
   else
-    priv->opaque_region = NULL;
+    self->opaque_region = NULL;
 }
 
 cairo_region_t *
-meta_shaped_texture_get_opaque_region (MetaShapedTexture *stex)
+meta_shaped_texture_get_opaque_region (MetaShapedTexture *self)
 {
-  MetaShapedTexturePrivate *priv = stex->priv;
-  return priv->opaque_region;
+  return self->opaque_region;
 }
 
 /**
  * meta_shaped_texture_get_image:
- * @stex: A #MetaShapedTexture
+ * @self: A #MetaShapedTexture
  * @clip: A clipping rectangle, to help prevent extra processing.
  * In the case that the clipping rectangle is partially or fully
  * outside the bounds of the texture, the rectangle will be clipped.
@@ -973,16 +936,16 @@ meta_shaped_texture_get_opaque_region (MetaShapedTexture *stex)
  * cairo_surface_destroy().
  */
 cairo_surface_t *
-meta_shaped_texture_get_image (MetaShapedTexture     *stex,
+meta_shaped_texture_get_image (MetaShapedTexture     *self,
                                cairo_rectangle_int_t *clip)
 {
   CoglTexture *texture, *mask_texture;
   cairo_rectangle_int_t texture_rect = { 0, 0, 0, 0 };
   cairo_surface_t *surface;
 
-  g_return_val_if_fail (META_IS_SHAPED_TEXTURE (stex), NULL);
+  g_return_val_if_fail (META_IS_SHAPED_TEXTURE (self), NULL);
 
-  texture = COGL_TEXTURE (stex->priv->texture);
+  texture = COGL_TEXTURE (self->texture);
 
   if (texture == NULL)
     return NULL;
@@ -1018,7 +981,7 @@ meta_shaped_texture_get_image (MetaShapedTexture     *stex,
   if (clip != NULL)
     cogl_object_unref (texture);
 
-  mask_texture = stex->priv->mask_texture;
+  mask_texture = self->mask_texture;
   if (mask_texture != NULL)
     {
       cairo_t *cr;
@@ -1061,10 +1024,8 @@ meta_shaped_texture_set_fallback_size (MetaShapedTexture *self,
                                        int                fallback_width,
                                        int                fallback_height)
 {
-  MetaShapedTexturePrivate *priv = self->priv;
-
-  priv->fallback_width = fallback_width;
-  priv->fallback_height = fallback_height;
+  self->fallback_width = fallback_width;
+  self->fallback_height = fallback_height;
 }
 
 static void
@@ -1073,19 +1034,18 @@ meta_shaped_texture_cull_out (MetaCullable   *cullable,
                               cairo_region_t *clip_region)
 {
   MetaShapedTexture *self = META_SHAPED_TEXTURE (cullable);
-  MetaShapedTexturePrivate *priv = self->priv;
 
   set_unobscured_region (self, unobscured_region);
   set_clip_region (self, clip_region);
 
   if (clutter_actor_get_paint_opacity (CLUTTER_ACTOR (self)) == 0xff)
     {
-      if (priv->opaque_region)
+      if (self->opaque_region)
         {
           if (unobscured_region)
-            cairo_region_subtract (unobscured_region, priv->opaque_region);
+            cairo_region_subtract (unobscured_region, self->opaque_region);
           if (clip_region)
-            cairo_region_subtract (clip_region, priv->opaque_region);
+            cairo_region_subtract (clip_region, self->opaque_region);
         }
     }
 }
diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index a099cef72..f8d6c32b7 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -37,15 +37,17 @@
 #include "wayland/meta-wayland-private.h"
 #include "wayland/meta-window-wayland.h"
 
-typedef struct _MetaSurfaceActorWaylandPrivate
+struct _MetaSurfaceActorWayland
 {
+  MetaSurfaceActor parent;
+
   MetaWaylandSurface *surface;
   struct wl_list frame_callback_list;
-} MetaSurfaceActorWaylandPrivate;
+};
 
-G_DEFINE_TYPE_WITH_PRIVATE (MetaSurfaceActorWayland,
-                            meta_surface_actor_wayland,
-                            META_TYPE_SURFACE_ACTOR)
+G_DEFINE_TYPE (MetaSurfaceActorWayland,
+               meta_surface_actor_wayland,
+               META_TYPE_SURFACE_ACTOR)
 
 static void
 meta_surface_actor_wayland_process_damage (MetaSurfaceActor *actor,
@@ -93,9 +95,7 @@ void
 meta_surface_actor_wayland_add_frame_callbacks (MetaSurfaceActorWayland *self,
                                                 struct wl_list *frame_callbacks)
 {
-  MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (self);
-
-  wl_list_insert_list (&priv->frame_callback_list, frame_callbacks);
+  wl_list_insert_list (&self->frame_callback_list, frame_callbacks);
 }
 
 static MetaWindow *
@@ -162,15 +162,13 @@ static void
 meta_surface_actor_wayland_paint (ClutterActor *actor)
 {
   MetaSurfaceActorWayland *self = META_SURFACE_ACTOR_WAYLAND (actor);
-  MetaSurfaceActorWaylandPrivate *priv =
-    meta_surface_actor_wayland_get_instance_private (self);
 
-  if (priv->surface)
+  if (self->surface)
     {
-      MetaWaylandCompositor *compositor = priv->surface->compositor;
+      MetaWaylandCompositor *compositor = self->surface->compositor;
 
-      wl_list_insert_list (&compositor->frame_callbacks, &priv->frame_callback_list);
-      wl_list_init (&priv->frame_callback_list);
+      wl_list_insert_list (&compositor->frame_callbacks, &self->frame_callback_list);
+      wl_list_init (&self->frame_callback_list);
     }
 
   CLUTTER_ACTOR_CLASS (meta_surface_actor_wayland_parent_class)->paint (actor);
@@ -180,21 +178,19 @@ static void
 meta_surface_actor_wayland_dispose (GObject *object)
 {
   MetaSurfaceActorWayland *self = META_SURFACE_ACTOR_WAYLAND (object);
-  MetaSurfaceActorWaylandPrivate *priv =
-    meta_surface_actor_wayland_get_instance_private (self);
   MetaWaylandFrameCallback *cb, *next;
   MetaShapedTexture *stex =
     meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
 
   meta_shaped_texture_set_texture (stex, NULL);
-  if (priv->surface)
+  if (self->surface)
     {
-      g_object_remove_weak_pointer (G_OBJECT (priv->surface),
-                                    (gpointer *) &priv->surface);
-      priv->surface = NULL;
+      g_object_remove_weak_pointer (G_OBJECT (self->surface),
+                                    (gpointer *) &self->surface);
+      self->surface = NULL;
     }
 
-  wl_list_for_each_safe (cb, next, &priv->frame_callback_list, link)
+  wl_list_for_each_safe (cb, next, &self->frame_callback_list, link)
     wl_resource_destroy (cb->resource);
 
   G_OBJECT_CLASS (meta_surface_actor_wayland_parent_class)->dispose (object);
@@ -233,14 +229,13 @@ MetaSurfaceActor *
 meta_surface_actor_wayland_new (MetaWaylandSurface *surface)
 {
   MetaSurfaceActorWayland *self = g_object_new (META_TYPE_SURFACE_ACTOR_WAYLAND, NULL);
-  MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (self);
 
   g_assert (meta_is_wayland_compositor ());
 
-  wl_list_init (&priv->frame_callback_list);
-  priv->surface = surface;
-  g_object_add_weak_pointer (G_OBJECT (priv->surface),
-                             (gpointer *) &priv->surface);
+  wl_list_init (&self->frame_callback_list);
+  self->surface = surface;
+  g_object_add_weak_pointer (G_OBJECT (self->surface),
+                             (gpointer *) &self->surface);
 
   return META_SURFACE_ACTOR (self);
 }
@@ -248,6 +243,5 @@ meta_surface_actor_wayland_new (MetaWaylandSurface *surface)
 MetaWaylandSurface *
 meta_surface_actor_wayland_get_surface (MetaSurfaceActorWayland *self)
 {
-  MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (self);
-  return priv->surface;
+  return self->surface;
 }
diff --git a/src/compositor/meta-surface-actor-wayland.h b/src/compositor/meta-surface-actor-wayland.h
index a037941e1..e1ad843f7 100644
--- a/src/compositor/meta-surface-actor-wayland.h
+++ b/src/compositor/meta-surface-actor-wayland.h
@@ -34,27 +34,11 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_SURFACE_ACTOR_WAYLAND            (meta_surface_actor_wayland_get_type ())
-#define META_SURFACE_ACTOR_WAYLAND(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_SURFACE_ACTOR_WAYLAND, MetaSurfaceActorWayland))
-#define META_SURFACE_ACTOR_WAYLAND_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_SURFACE_ACTOR_WAYLAND, MetaSurfaceActorWaylandClass))
-#define META_IS_SURFACE_ACTOR_WAYLAND(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_SURFACE_ACTOR_WAYLAND))
-#define META_IS_SURFACE_ACTOR_WAYLAND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_SURFACE_ACTOR_WAYLAND))
-#define META_SURFACE_ACTOR_WAYLAND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_SURFACE_ACTOR_WAYLAND, MetaSurfaceActorWaylandClass))
-
-typedef struct _MetaSurfaceActorWayland      MetaSurfaceActorWayland;
-typedef struct _MetaSurfaceActorWaylandClass MetaSurfaceActorWaylandClass;
-
-struct _MetaSurfaceActorWayland
-{
-  MetaSurfaceActor parent;
-};
-
-struct _MetaSurfaceActorWaylandClass
-{
-  MetaSurfaceActorClass parent_class;
-};
-
-GType meta_surface_actor_wayland_get_type (void);
+#define META_TYPE_SURFACE_ACTOR_WAYLAND (meta_surface_actor_wayland_get_type ())
+G_DECLARE_FINAL_TYPE (MetaSurfaceActorWayland,
+                      meta_surface_actor_wayland,
+                      META, SURFACE_ACTOR_WAYLAND,
+                      MetaSurfaceActor)
 
 MetaSurfaceActor * meta_surface_actor_wayland_new (MetaWaylandSurface *surface);
 MetaWaylandSurface * meta_surface_actor_wayland_get_surface (MetaSurfaceActorWayland *self);
diff --git a/src/compositor/meta-surface-actor-x11.c b/src/compositor/meta-surface-actor-x11.c
index 1f897be3f..244b1e885 100644
--- a/src/compositor/meta-surface-actor-x11.c
+++ b/src/compositor/meta-surface-actor-x11.c
@@ -37,8 +37,10 @@
 #include "x11/meta-x11-display-private.h"
 #include "x11/window-x11.h"
 
-struct _MetaSurfaceActorX11Private
+struct _MetaSurfaceActorX11
 {
+  MetaSurfaceActor parent;
+
   MetaWindow *window;
 
   MetaDisplay *display;
@@ -60,35 +62,34 @@ struct _MetaSurfaceActorX11Private
 
   guint unredirected   : 1;
 };
-typedef struct _MetaSurfaceActorX11Private MetaSurfaceActorX11Private;
 
-G_DEFINE_TYPE_WITH_PRIVATE (MetaSurfaceActorX11, meta_surface_actor_x11, META_TYPE_SURFACE_ACTOR)
+G_DEFINE_TYPE (MetaSurfaceActorX11,
+               meta_surface_actor_x11,
+               META_TYPE_SURFACE_ACTOR)
 
 static void
 free_damage (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  MetaDisplay *display = priv->display;
+  MetaDisplay *display = self->display;
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
 
-  if (priv->damage == None)
+  if (self->damage == None)
     return;
 
   meta_x11_error_trap_push (display->x11_display);
-  XDamageDestroy (xdisplay, priv->damage);
-  priv->damage = None;
+  XDamageDestroy (xdisplay, self->damage);
+  self->damage = None;
   meta_x11_error_trap_pop (display->x11_display);
 }
 
 static void
 detach_pixmap (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  MetaDisplay *display = priv->display;
+  MetaDisplay *display = self->display;
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
   MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
 
-  if (priv->pixmap == None)
+  if (self->pixmap == None)
     return;
 
   /* Get rid of all references to the pixmap before freeing it; it's unclear whether
@@ -99,28 +100,26 @@ detach_pixmap (MetaSurfaceActorX11 *self)
   cogl_flush ();
 
   meta_x11_error_trap_push (display->x11_display);
-  XFreePixmap (xdisplay, priv->pixmap);
-  priv->pixmap = None;
+  XFreePixmap (xdisplay, self->pixmap);
+  self->pixmap = None;
   meta_x11_error_trap_pop (display->x11_display);
 
-  g_clear_pointer (&priv->texture, cogl_object_unref);
+  g_clear_pointer (&self->texture, cogl_object_unref);
 }
 
 static void
 set_pixmap (MetaSurfaceActorX11 *self,
             Pixmap               pixmap)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-
   CoglContext *ctx = clutter_backend_get_cogl_context (clutter_get_default_backend ());
   MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
   CoglError *error = NULL;
   CoglTexture *texture;
 
-  g_assert (priv->pixmap == None);
-  priv->pixmap = pixmap;
+  g_assert (self->pixmap == None);
+  self->pixmap = pixmap;
 
-  texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, priv->pixmap, FALSE, &error));
+  texture = COGL_TEXTURE (cogl_texture_pixmap_x11_new (ctx, self->pixmap, FALSE, &error));
 
   if (error != NULL)
     {
@@ -130,27 +129,26 @@ set_pixmap (MetaSurfaceActorX11 *self,
   else if (G_UNLIKELY (!cogl_texture_pixmap_x11_is_using_tfp_extension (COGL_TEXTURE_PIXMAP_X11 (texture))))
     g_warning ("NOTE: Not using GLX TFP!\n");
 
-  priv->texture = texture;
+  self->texture = texture;
   meta_shaped_texture_set_texture (stex, texture);
 }
 
 static void
 update_pixmap (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  MetaDisplay *display = priv->display;
+  MetaDisplay *display = self->display;
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
 
-  if (priv->size_changed)
+  if (self->size_changed)
     {
       detach_pixmap (self);
-      priv->size_changed = FALSE;
+      self->size_changed = FALSE;
     }
 
-  if (priv->pixmap == None)
+  if (self->pixmap == None)
     {
       Pixmap new_pixmap;
-      Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
+      Window xwindow = meta_window_x11_get_toplevel_xwindow (self->window);
 
       meta_x11_error_trap_push (display->x11_display);
       new_pixmap = XCompositeNameWindowPixmap (xdisplay, xwindow);
@@ -170,7 +168,7 @@ update_pixmap (MetaSurfaceActorX11 *self)
       if (new_pixmap == None)
         {
           meta_verbose ("Unable to get named pixmap for %s\n",
-                        meta_window_get_description (priv->window));
+                        meta_window_get_description (self->window));
           return;
         }
 
@@ -181,8 +179,7 @@ update_pixmap (MetaSurfaceActorX11 *self)
 static gboolean
 is_visible (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  return (priv->pixmap != None) && !priv->unredirected;
+  return (self->pixmap != None) && !self->unredirected;
 }
 
 static void
@@ -190,31 +187,30 @@ meta_surface_actor_x11_process_damage (MetaSurfaceActor *actor,
                                        int x, int y, int width, int height)
 {
   MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
 
-  priv->received_damage = TRUE;
+  self->received_damage = TRUE;
 
-  if (meta_window_is_fullscreen (priv->window) && !priv->unredirected && !priv->does_full_damage)
+  if (meta_window_is_fullscreen (self->window) && !self->unredirected && !self->does_full_damage)
     {
       MetaRectangle window_rect;
-      meta_window_get_frame_rect (priv->window, &window_rect);
+      meta_window_get_frame_rect (self->window, &window_rect);
 
       if (x == 0 &&
           y == 0 &&
           window_rect.width == width &&
           window_rect.height == height)
-        priv->full_damage_frames_count++;
+        self->full_damage_frames_count++;
       else
-        priv->full_damage_frames_count = 0;
+        self->full_damage_frames_count = 0;
 
-      if (priv->full_damage_frames_count >= 100)
-        priv->does_full_damage = TRUE;
+      if (self->full_damage_frames_count >= 100)
+        self->does_full_damage = TRUE;
     }
 
   if (!is_visible (self))
     return;
 
-  cogl_texture_pixmap_x11_update_area (COGL_TEXTURE_PIXMAP_X11 (priv->texture),
+  cogl_texture_pixmap_x11_update_area (COGL_TEXTURE_PIXMAP_X11 (self->texture),
                                        x, y, width, height);
 }
 
@@ -222,17 +218,16 @@ static void
 meta_surface_actor_x11_pre_paint (MetaSurfaceActor *actor)
 {
   MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  MetaDisplay *display = priv->display;
+  MetaDisplay *display = self->display;
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
 
-  if (priv->received_damage)
+  if (self->received_damage)
     {
       meta_x11_error_trap_push (display->x11_display);
-      XDamageSubtract (xdisplay, priv->damage, None, None);
+      XDamageSubtract (xdisplay, self->damage, None, None);
       meta_x11_error_trap_pop (display->x11_display);
 
-      priv->received_damage = FALSE;
+      self->received_damage = FALSE;
     }
 
   update_pixmap (self);
@@ -249,7 +244,6 @@ static gboolean
 meta_surface_actor_x11_is_opaque (MetaSurfaceActor *actor)
 {
   MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
 
   /* If we're not ARGB32, then we're opaque. */
   if (!meta_surface_actor_is_argb32 (actor))
@@ -261,7 +255,7 @@ meta_surface_actor_x11_is_opaque (MetaSurfaceActor *actor)
   if (!opaque_region)
     return FALSE;
 
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
   cairo_rectangle_int_t client_area;
   meta_window_get_client_area_rect (window, &client_area);
 
@@ -276,9 +270,8 @@ static gboolean
 meta_surface_actor_x11_should_unredirect (MetaSurfaceActor *actor)
 {
   MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
 
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
 
   if (meta_window_requested_dont_bypass_compositor (window))
     return FALSE;
@@ -301,7 +294,7 @@ meta_surface_actor_x11_should_unredirect (MetaSurfaceActor *actor)
   if (meta_window_is_override_redirect (window))
     return TRUE;
 
-  if (priv->does_full_damage)
+  if (self->does_full_damage)
     return TRUE;
 
   return FALSE;
@@ -310,14 +303,13 @@ meta_surface_actor_x11_should_unredirect (MetaSurfaceActor *actor)
 static void
 sync_unredirected (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  MetaDisplay *display = priv->display;
+  MetaDisplay *display = self->display;
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
-  Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
+  Window xwindow = meta_window_x11_get_toplevel_xwindow (self->window);
 
   meta_x11_error_trap_push (display->x11_display);
 
-  if (priv->unredirected)
+  if (self->unredirected)
     {
       detach_pixmap (self);
       XCompositeUnredirectWindow (xdisplay, xwindow, CompositeRedirectManual);
@@ -335,12 +327,11 @@ meta_surface_actor_x11_set_unredirected (MetaSurfaceActor *actor,
                                          gboolean          unredirected)
 {
   MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
 
-  if (priv->unredirected == unredirected)
+  if (self->unredirected == unredirected)
     return;
 
-  priv->unredirected = unredirected;
+  self->unredirected = unredirected;
   sync_unredirected (self);
 }
 
@@ -348,9 +339,8 @@ static gboolean
 meta_surface_actor_x11_is_unredirected (MetaSurfaceActor *actor)
 {
   MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
 
-  return priv->unredirected;
+  return self->unredirected;
 }
 
 static void
@@ -367,9 +357,8 @@ meta_surface_actor_x11_dispose (GObject *object)
 static MetaWindow *
 meta_surface_actor_x11_get_window (MetaSurfaceActor *actor)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (META_SURFACE_ACTOR_X11 
(actor));
-
-  return priv->window;
+  MetaSurfaceActorX11 *self = META_SURFACE_ACTOR_X11 (actor);
+  return self->window;
 }
 
 static void
@@ -394,20 +383,17 @@ meta_surface_actor_x11_class_init (MetaSurfaceActorX11Class *klass)
 static void
 meta_surface_actor_x11_init (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-
-  priv->last_width = -1;
-  priv->last_height = -1;
+  self->last_width = -1;
+  self->last_height = -1;
 }
 
 static void
 create_damage (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
-  Display *xdisplay = meta_x11_display_get_xdisplay (priv->display->x11_display);
-  Window xwindow = meta_window_x11_get_toplevel_xwindow (priv->window);
+  Display *xdisplay = meta_x11_display_get_xdisplay (self->display->x11_display);
+  Window xwindow = meta_window_x11_get_toplevel_xwindow (self->window);
 
-  priv->damage = XDamageCreate (xdisplay, xwindow, XDamageReportBoundingBox);
+  self->damage = XDamageCreate (xdisplay, xwindow, XDamageReportBoundingBox);
 }
 
 static void
@@ -425,39 +411,37 @@ window_decorated_notify (MetaWindow *window,
 static void
 reset_texture (MetaSurfaceActorX11 *self)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
   MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
 
-  if (!priv->texture)
+  if (!self->texture)
     return;
 
   /* Setting the texture to NULL will cause all the FBO's cached by the
    * shaped texture's MetaTextureTower to be discarded and recreated.
    */
   meta_shaped_texture_set_texture (stex, NULL);
-  meta_shaped_texture_set_texture (stex, priv->texture);
+  meta_shaped_texture_set_texture (stex, self->texture);
 }
 
 MetaSurfaceActor *
 meta_surface_actor_x11_new (MetaWindow *window)
 {
   MetaSurfaceActorX11 *self = g_object_new (META_TYPE_SURFACE_ACTOR_X11, NULL);
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
   MetaDisplay *display = meta_window_get_display (window);
 
   g_assert (!meta_is_wayland_compositor ());
 
-  priv->window = window;
-  priv->display = display;
+  self->window = window;
+  self->display = display;
 
-  g_signal_connect_object (priv->display, "gl-video-memory-purged",
+  g_signal_connect_object (self->display, "gl-video-memory-purged",
                            G_CALLBACK (reset_texture), self, G_CONNECT_SWAPPED);
 
   create_damage (self);
-  g_signal_connect_object (priv->window, "notify::decorated",
+  g_signal_connect_object (self->window, "notify::decorated",
                            G_CALLBACK (window_decorated_notify), self, 0);
 
-  priv->unredirected = FALSE;
+  self->unredirected = FALSE;
   sync_unredirected (self);
 
   clutter_actor_set_reactive (CLUTTER_ACTOR (self), TRUE);
@@ -468,15 +452,14 @@ void
 meta_surface_actor_x11_set_size (MetaSurfaceActorX11 *self,
                                  int width, int height)
 {
-  MetaSurfaceActorX11Private *priv = meta_surface_actor_x11_get_instance_private (self);
   MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
 
-  if (priv->last_width == width &&
-      priv->last_height == height)
+  if (self->last_width == width &&
+      self->last_height == height)
     return;
 
-  priv->size_changed = TRUE;
-  priv->last_width = width;
-  priv->last_height = height;
+  self->size_changed = TRUE;
+  self->last_width = width;
+  self->last_height = height;
   meta_shaped_texture_set_fallback_size (stex, width, height);
 }
diff --git a/src/compositor/meta-surface-actor-x11.h b/src/compositor/meta-surface-actor-x11.h
index e1b2014a0..2c4ed4dd6 100644
--- a/src/compositor/meta-surface-actor-x11.h
+++ b/src/compositor/meta-surface-actor-x11.h
@@ -36,27 +36,11 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_SURFACE_ACTOR_X11            (meta_surface_actor_x11_get_type ())
-#define META_SURFACE_ACTOR_X11(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_SURFACE_ACTOR_X11, MetaSurfaceActorX11))
-#define META_SURFACE_ACTOR_X11_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_SURFACE_ACTOR_X11, MetaSurfaceActorX11Class))
-#define META_IS_SURFACE_ACTOR_X11(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_SURFACE_ACTOR_X11))
-#define META_IS_SURFACE_ACTOR_X11_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_SURFACE_ACTOR_X11))
-#define META_SURFACE_ACTOR_X11_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_SURFACE_ACTOR_X11, MetaSurfaceActorX11Class))
-
-typedef struct _MetaSurfaceActorX11      MetaSurfaceActorX11;
-typedef struct _MetaSurfaceActorX11Class MetaSurfaceActorX11Class;
-
-struct _MetaSurfaceActorX11
-{
-  MetaSurfaceActor parent;
-};
-
-struct _MetaSurfaceActorX11Class
-{
-  MetaSurfaceActorClass parent_class;
-};
-
-GType meta_surface_actor_x11_get_type (void);
+#define META_TYPE_SURFACE_ACTOR_X11 (meta_surface_actor_x11_get_type ())
+G_DECLARE_FINAL_TYPE (MetaSurfaceActorX11,
+                      meta_surface_actor_x11,
+                      META, SURFACE_ACTOR_X11,
+                      MetaSurfaceActor)
 
 MetaSurfaceActor * meta_surface_actor_x11_new (MetaWindow *window);
 
diff --git a/src/compositor/meta-surface-actor.c b/src/compositor/meta-surface-actor.c
index 256215373..14d07412c 100644
--- a/src/compositor/meta-surface-actor.c
+++ b/src/compositor/meta-surface-actor.c
@@ -18,7 +18,7 @@
 #include "compositor/meta-shaped-texture-private.h"
 #include "meta/meta-shaped-texture.h"
 
-struct _MetaSurfaceActorPrivate
+typedef struct _MetaSurfaceActorPrivate
 {
   MetaShapedTexture *texture;
 
@@ -27,7 +27,7 @@ struct _MetaSurfaceActorPrivate
   /* Freeze/thaw accounting */
   cairo_region_t *pending_damage;
   guint frozen : 1;
-};
+} MetaSurfaceActorPrivate;
 
 static void cullable_iface_init (MetaCullableInterface *iface);
 
@@ -49,7 +49,8 @@ meta_surface_actor_pick (ClutterActor       *actor,
                          const ClutterColor *color)
 {
   MetaSurfaceActor *self = META_SURFACE_ACTOR (actor);
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
   ClutterActorIter iter;
   ClutterActor *child;
 
@@ -113,7 +114,8 @@ static void
 meta_surface_actor_dispose (GObject *object)
 {
   MetaSurfaceActor *self = META_SURFACE_ACTOR (object);
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
 
   g_clear_pointer (&priv->input_region, cairo_region_destroy);
 
@@ -177,11 +179,8 @@ texture_size_changed (MetaShapedTexture *texture,
 static void
 meta_surface_actor_init (MetaSurfaceActor *self)
 {
-  MetaSurfaceActorPrivate *priv;
-
-  priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
-                                                   META_TYPE_SURFACE_ACTOR,
-                                                   MetaSurfaceActorPrivate);
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
 
   priv->texture = META_SHAPED_TEXTURE (meta_shaped_texture_new ());
   g_signal_connect_object (priv->texture, "size-changed",
@@ -193,20 +192,27 @@ cairo_surface_t *
 meta_surface_actor_get_image (MetaSurfaceActor      *self,
                               cairo_rectangle_int_t *clip)
 {
-  return meta_shaped_texture_get_image (self->priv->texture, clip);
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
+
+  return meta_shaped_texture_get_image (priv->texture, clip);
 }
 
 MetaShapedTexture *
 meta_surface_actor_get_texture (MetaSurfaceActor *self)
 {
-  return self->priv->texture;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
+
+  return priv->texture;
 }
 
 static void
 meta_surface_actor_update_area (MetaSurfaceActor *self,
                                 int x, int y, int width, int height)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
 
   if (meta_shaped_texture_update_area (priv->texture, x, y, width, height))
     g_signal_emit (self, signals[REPAINT_SCHEDULED], 0);
@@ -215,7 +221,9 @@ meta_surface_actor_update_area (MetaSurfaceActor *self,
 gboolean
 meta_surface_actor_is_obscured (MetaSurfaceActor *self)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
+
   return meta_shaped_texture_is_obscured (priv->texture);
 }
 
@@ -223,7 +231,8 @@ void
 meta_surface_actor_set_input_region (MetaSurfaceActor *self,
                                      cairo_region_t   *region)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
 
   if (priv->input_region)
     cairo_region_destroy (priv->input_region);
@@ -238,21 +247,27 @@ void
 meta_surface_actor_set_opaque_region (MetaSurfaceActor *self,
                                       cairo_region_t   *region)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
+
   meta_shaped_texture_set_opaque_region (priv->texture, region);
 }
 
 cairo_region_t *
-meta_surface_actor_get_opaque_region (MetaSurfaceActor *actor)
+meta_surface_actor_get_opaque_region (MetaSurfaceActor *self)
 {
-  MetaSurfaceActorPrivate *priv = actor->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
+
   return meta_shaped_texture_get_opaque_region (priv->texture);
 }
 
 static gboolean
 is_frozen (MetaSurfaceActor *self)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+    = meta_surface_actor_get_instance_private (self);
+
   return priv->frozen;
 }
 
@@ -260,7 +275,8 @@ void
 meta_surface_actor_process_damage (MetaSurfaceActor *self,
                                    int x, int y, int width, int height)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+      = meta_surface_actor_get_instance_private (self);
 
   if (is_frozen (self))
     {
@@ -339,7 +355,8 @@ void
 meta_surface_actor_set_frozen (MetaSurfaceActor *self,
                                gboolean          frozen)
 {
-  MetaSurfaceActorPrivate *priv = self->priv;
+  MetaSurfaceActorPrivate *priv
+      = meta_surface_actor_get_instance_private (self);
 
   priv->frozen = frozen;
 
diff --git a/src/compositor/meta-surface-actor.h b/src/compositor/meta-surface-actor.h
index 6a2740023..418619eea 100644
--- a/src/compositor/meta-surface-actor.h
+++ b/src/compositor/meta-surface-actor.h
@@ -10,16 +10,11 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_SURFACE_ACTOR            (meta_surface_actor_get_type())
-#define META_SURFACE_ACTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SURFACE_ACTOR, 
MetaSurfaceActor))
-#define META_SURFACE_ACTOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_SURFACE_ACTOR, 
MetaSurfaceActorClass))
-#define META_IS_SURFACE_ACTOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_SURFACE_ACTOR))
-#define META_IS_SURFACE_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_SURFACE_ACTOR))
-#define META_SURFACE_ACTOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_SURFACE_ACTOR, 
MetaSurfaceActorClass))
-
-typedef struct _MetaSurfaceActor        MetaSurfaceActor;
-typedef struct _MetaSurfaceActorClass   MetaSurfaceActorClass;
-typedef struct _MetaSurfaceActorPrivate MetaSurfaceActorPrivate;
+#define META_TYPE_SURFACE_ACTOR (meta_surface_actor_get_type ())
+G_DECLARE_DERIVABLE_TYPE (MetaSurfaceActor,
+                          meta_surface_actor,
+                          META, SURFACE_ACTOR,
+                          ClutterActor)
 
 struct _MetaSurfaceActorClass
 {
@@ -39,15 +34,6 @@ struct _MetaSurfaceActorClass
   MetaWindow *(* get_window)      (MetaSurfaceActor *actor);
 };
 
-struct _MetaSurfaceActor
-{
-  ClutterActor            parent;
-
-  MetaSurfaceActorPrivate *priv;
-};
-
-GType meta_surface_actor_get_type (void);
-
 cairo_surface_t *meta_surface_actor_get_image (MetaSurfaceActor      *self,
                                                cairo_rectangle_int_t *clip);
 
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 4456e1892..22905dc11 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -46,8 +46,10 @@ typedef enum {
   EMITTED_FIRST_FRAME
 } FirstFrameState;
 
-struct _MetaWindowActorPrivate
+struct _MetaWindowActor
 {
+  ClutterActor           parent;
+
   MetaWindow *window;
   MetaCompositor *compositor;
 
@@ -187,7 +189,6 @@ static void do_send_frame_timings (MetaWindowActor  *self,
 static void cullable_iface_init (MetaCullableInterface *iface);
 
 G_DEFINE_TYPE_WITH_CODE (MetaWindowActor, meta_window_actor, CLUTTER_TYPE_ACTOR,
-                         G_ADD_PRIVATE (MetaWindowActor)
                          G_IMPLEMENT_INTERFACE (META_TYPE_CULLABLE, cullable_iface_init));
 
 static void
@@ -287,12 +288,7 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
 static void
 meta_window_actor_init (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv;
-
-  priv = self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
-                                                  META_TYPE_WINDOW_ACTOR,
-                                                  MetaWindowActorPrivate);
-  priv->shadow_class = NULL;
+  self->shadow_class = NULL;
 }
 
 static void
@@ -317,22 +313,19 @@ surface_repaint_scheduled (MetaSurfaceActor *actor,
                            gpointer          user_data)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (user_data);
-  MetaWindowActorPrivate *priv = self->priv;
 
-  priv->repaint_scheduled = TRUE;
+  self->repaint_scheduled = TRUE;
 }
 
 static gboolean
 is_argb32 (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
   /* assume we're argb until we get the window (because
      in practice we're drawing nothing, so we're fully
      transparent)
   */
-  if (priv->surface)
-    return meta_surface_actor_is_argb32 (priv->surface);
+  if (self->surface)
+    return meta_surface_actor_is_argb32 (self->surface);
   else
     return TRUE;
 }
@@ -340,8 +333,7 @@ is_argb32 (MetaWindowActor *self)
 static gboolean
 is_non_opaque (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
 
   return is_argb32 (self) || (window->opacity != 0xFF);
 }
@@ -349,32 +341,26 @@ is_non_opaque (MetaWindowActor *self)
 static gboolean
 is_frozen (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  return priv->surface == NULL || priv->freeze_count > 0;
+  return self->surface == NULL || self->freeze_count > 0;
 }
 
 static void
 meta_window_actor_freeze (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
+  if (self->freeze_count == 0 && self->surface)
+    meta_surface_actor_set_frozen (self->surface, TRUE);
 
-  if (priv->freeze_count == 0 && priv->surface)
-    meta_surface_actor_set_frozen (priv->surface, TRUE);
-
-  priv->freeze_count ++;
+  self->freeze_count ++;
 }
 
 static void
 meta_window_actor_sync_thawed_state (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->first_frame_state == INITIALLY_FROZEN)
-    priv->first_frame_state = DRAWING_FIRST_FRAME;
+  if (self->first_frame_state == INITIALLY_FROZEN)
+    self->first_frame_state = DRAWING_FIRST_FRAME;
 
-  if (priv->surface)
-    meta_surface_actor_set_frozen (priv->surface, FALSE);
+  if (self->surface)
+    meta_surface_actor_set_frozen (self->surface, FALSE);
 
   /* We sometimes ignore moves and resizes on frozen windows */
   meta_window_actor_sync_actor_geometry (self, FALSE);
@@ -383,13 +369,11 @@ meta_window_actor_sync_thawed_state (MetaWindowActor *self)
 static void
 meta_window_actor_thaw (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->freeze_count <= 0)
+  if (self->freeze_count <= 0)
     g_error ("Error in freeze/thaw accounting");
 
-  priv->freeze_count--;
-  if (priv->freeze_count > 0)
+  self->freeze_count--;
+  if (self->freeze_count > 0)
     return;
 
   /* We still might be frozen due to lack of a MetaSurfaceActor */
@@ -407,32 +391,30 @@ static void
 set_surface (MetaWindowActor  *self,
              MetaSurfaceActor *surface)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->surface)
+  if (self->surface)
     {
-      g_signal_handler_disconnect (priv->surface, priv->repaint_scheduled_id);
-      g_signal_handler_disconnect (priv->surface, priv->size_changed_id);
-      priv->repaint_scheduled_id = 0;
-      clutter_actor_remove_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
-      g_object_unref (priv->surface);
+      g_signal_handler_disconnect (self->surface, self->repaint_scheduled_id);
+      g_signal_handler_disconnect (self->surface, self->size_changed_id);
+      self->repaint_scheduled_id = 0;
+      clutter_actor_remove_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (self->surface));
+      g_object_unref (self->surface);
     }
 
-  priv->surface = surface;
+  self->surface = surface;
 
-  if (priv->surface)
+  if (self->surface)
     {
-      g_object_ref_sink (priv->surface);
-      priv->repaint_scheduled_id = g_signal_connect (priv->surface, "repaint-scheduled",
+      g_object_ref_sink (self->surface);
+      self->repaint_scheduled_id = g_signal_connect (self->surface, "repaint-scheduled",
                                                      G_CALLBACK (surface_repaint_scheduled), self);
-      priv->size_changed_id = g_signal_connect (priv->surface, "size-changed",
+      self->size_changed_id = g_signal_connect (self->surface, "size-changed",
                                                 G_CALLBACK (surface_size_changed), self);
-      clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (priv->surface));
+      clutter_actor_add_child (CLUTTER_ACTOR (self), CLUTTER_ACTOR (self->surface));
 
       meta_window_actor_update_shape (self);
 
       if (is_frozen (self))
-        meta_surface_actor_set_frozen (priv->surface, TRUE);
+        meta_surface_actor_set_frozen (self->surface, TRUE);
       else
         meta_window_actor_sync_thawed_state (self);
     }
@@ -441,8 +423,7 @@ set_surface (MetaWindowActor  *self,
 void
 meta_window_actor_update_surface (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
   MetaSurfaceActor *surface_actor;
 
 #ifdef HAVE_WAYLAND
@@ -462,10 +443,9 @@ static void
 meta_window_actor_constructed (GObject *object)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (object);
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
 
-  priv->compositor = window->display->compositor;
+  self->compositor = window->display->compositor;
 
   meta_window_actor_update_surface (self);
 
@@ -473,38 +453,37 @@ meta_window_actor_constructed (GObject *object)
 
   /* Start off with an empty shape region to maintain the invariant
    * that it's always set */
-  priv->shape_region = cairo_region_create ();
+  self->shape_region = cairo_region_create ();
 }
 
 static void
 meta_window_actor_dispose (GObject *object)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (object);
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaCompositor *compositor = priv->compositor;
+  MetaCompositor *compositor = self->compositor;
 
-  if (priv->disposed)
+  if (self->disposed)
     return;
 
-  priv->disposed = TRUE;
+  self->disposed = TRUE;
 
-  if (priv->send_frame_messages_timer != 0)
+  if (self->send_frame_messages_timer != 0)
     {
-      g_source_remove (priv->send_frame_messages_timer);
-      priv->send_frame_messages_timer = 0;
+      g_source_remove (self->send_frame_messages_timer);
+      self->send_frame_messages_timer = 0;
     }
 
-  g_clear_pointer (&priv->shape_region, cairo_region_destroy);
-  g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
+  g_clear_pointer (&self->shape_region, cairo_region_destroy);
+  g_clear_pointer (&self->shadow_clip, cairo_region_destroy);
 
-  g_clear_pointer (&priv->shadow_class, g_free);
-  g_clear_pointer (&priv->focused_shadow, meta_shadow_unref);
-  g_clear_pointer (&priv->unfocused_shadow, meta_shadow_unref);
-  g_clear_pointer (&priv->shadow_shape, meta_window_shape_unref);
+  g_clear_pointer (&self->shadow_class, g_free);
+  g_clear_pointer (&self->focused_shadow, meta_shadow_unref);
+  g_clear_pointer (&self->unfocused_shadow, meta_shadow_unref);
+  g_clear_pointer (&self->shadow_shape, meta_window_shape_unref);
 
   compositor->windows = g_list_remove (compositor->windows, (gconstpointer) self);
 
-  g_clear_object (&priv->window);
+  g_clear_object (&self->window);
 
   set_surface (self, NULL);
 
@@ -515,9 +494,8 @@ static void
 meta_window_actor_finalize (GObject *object)
 {
   MetaWindowActor        *self = META_WINDOW_ACTOR (object);
-  MetaWindowActorPrivate *priv = self->priv;
 
-  g_list_free_full (priv->frames, (GDestroyNotify) frame_data_free);
+  g_list_free_full (self->frames, (GDestroyNotify) frame_data_free);
 
   G_OBJECT_CLASS (meta_window_actor_parent_class)->finalize (object);
 }
@@ -528,24 +506,23 @@ meta_window_actor_set_property (GObject      *object,
                                 const GValue *value,
                                 GParamSpec   *pspec)
 {
-  MetaWindowActor        *self   = META_WINDOW_ACTOR (object);
-  MetaWindowActorPrivate *priv = self->priv;
+  MetaWindowActor *self = META_WINDOW_ACTOR (object);
 
   switch (prop_id)
     {
     case PROP_META_WINDOW:
-      priv->window = g_value_dup_object (value);
-      g_signal_connect_object (priv->window, "notify::appears-focused",
+      self->window = g_value_dup_object (value);
+      g_signal_connect_object (self->window, "notify::appears-focused",
                                G_CALLBACK (window_appears_focused_notify), self, 0);
       break;
     case PROP_SHADOW_MODE:
       {
         MetaShadowMode newv = g_value_get_enum (value);
 
-        if (newv == priv->shadow_mode)
+        if (newv == self->shadow_mode)
           return;
 
-        priv->shadow_mode = newv;
+        self->shadow_mode = newv;
 
         meta_window_actor_invalidate_shadow (self);
       }
@@ -554,11 +531,11 @@ meta_window_actor_set_property (GObject      *object,
       {
         const char *newv = g_value_get_string (value);
 
-        if (g_strcmp0 (newv, priv->shadow_class) == 0)
+        if (g_strcmp0 (newv, self->shadow_class) == 0)
           return;
 
-        g_free (priv->shadow_class);
-        priv->shadow_class = g_strdup (newv);
+        g_free (self->shadow_class);
+        self->shadow_class = g_strdup (newv);
 
         meta_window_actor_invalidate_shadow (self);
       }
@@ -575,18 +552,18 @@ meta_window_actor_get_property (GObject      *object,
                                 GValue       *value,
                                 GParamSpec   *pspec)
 {
-  MetaWindowActorPrivate *priv = META_WINDOW_ACTOR (object)->priv;
+  MetaWindowActor *self = META_WINDOW_ACTOR (object);
 
   switch (prop_id)
     {
     case PROP_META_WINDOW:
-      g_value_set_object (value, priv->window);
+      g_value_set_object (value, self->window);
       break;
     case PROP_SHADOW_MODE:
-      g_value_set_enum (value, priv->shadow_mode);
+      g_value_set_enum (value, self->shadow_mode);
       break;
     case PROP_SHADOW_CLASS:
-      g_value_set_string (value, priv->shadow_class);
+      g_value_set_string (value, self->shadow_class);
       break;
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -597,13 +574,11 @@ meta_window_actor_get_property (GObject      *object,
 static const char *
 meta_window_actor_get_shadow_class (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->shadow_class != NULL)
-    return priv->shadow_class;
+  if (self->shadow_class != NULL)
+    return self->shadow_class;
   else
     {
-      MetaWindowType window_type = meta_window_get_window_type (priv->window);
+      MetaWindowType window_type = meta_window_get_window_type (self->window);
 
       switch (window_type)
         {
@@ -614,7 +589,7 @@ meta_window_actor_get_shadow_class (MetaWindowActor *self)
           return "popup-menu";
         default:
           {
-            MetaFrameType frame_type = meta_window_get_frame_type (priv->window);
+            MetaFrameType frame_type = meta_window_get_frame_type (self->window);
             return meta_frame_type_to_string (frame_type);
           }
         }
@@ -637,9 +612,7 @@ void
 meta_window_actor_get_shape_bounds (MetaWindowActor       *self,
                                     cairo_rectangle_int_t *bounds)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  cairo_region_get_extents (priv->shape_region, bounds);
+  cairo_region_get_extents (self->shape_region, bounds);
 }
 
 static void
@@ -647,8 +620,7 @@ meta_window_actor_get_shadow_bounds (MetaWindowActor       *self,
                                      gboolean               appears_focused,
                                      cairo_rectangle_int_t *bounds)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaShadow *shadow = appears_focused ? priv->focused_shadow : priv->unfocused_shadow;
+  MetaShadow *shadow = appears_focused ? self->focused_shadow : self->unfocused_shadow;
   cairo_rectangle_int_t shape_bounds;
   MetaShadowParams params;
 
@@ -678,26 +650,23 @@ meta_window_actor_get_shadow_bounds (MetaWindowActor       *self,
 static gboolean
 clip_shadow_under_window (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  return is_non_opaque (self) && priv->window->frame;
+  return is_non_opaque (self) && self->window->frame;
 }
 
 static void
 assign_frame_counter_to_frames (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaCompositor *compositor = priv->compositor;
+  MetaCompositor *compositor = self->compositor;
   ClutterStage *stage = CLUTTER_STAGE (compositor->stage);
   GList *l;
 
   /* If the window is obscured, then we're expecting to deal with sending
    * frame messages in a timeout, rather than in this paint cycle.
    */
-  if (priv->send_frame_messages_timer != 0)
+  if (self->send_frame_messages_timer != 0)
     return;
 
-  for (l = priv->frames; l; l = l->next)
+  for (l = self->frames; l; l = l->next)
     {
       FrameData *frame = l->data;
 
@@ -710,19 +679,18 @@ static void
 meta_window_actor_paint (ClutterActor *actor)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (actor);
-  MetaWindowActorPrivate *priv = self->priv;
-  gboolean appears_focused = meta_window_appears_focused (priv->window);
-  MetaShadow *shadow = appears_focused ? priv->focused_shadow : priv->unfocused_shadow;
+  gboolean appears_focused = meta_window_appears_focused (self->window);
+  MetaShadow *shadow = appears_focused ? self->focused_shadow : self->unfocused_shadow;
   CoglFramebuffer *framebuffer = cogl_get_draw_framebuffer ();
 
  /* This window got damage when obscured; we set up a timer
   * to send frame completion events, but since we're drawing
   * the window now (for some other reason) cancel the timer
   * and send the completion events normally */
-  if (priv->send_frame_messages_timer != 0)
+  if (self->send_frame_messages_timer != 0)
     {
-      g_source_remove (priv->send_frame_messages_timer);
-      priv->send_frame_messages_timer = 0;
+      g_source_remove (self->send_frame_messages_timer);
+      self->send_frame_messages_timer = 0;
 
       assign_frame_counter_to_frames (self);
     }
@@ -731,18 +699,18 @@ meta_window_actor_paint (ClutterActor *actor)
     {
       MetaShadowParams params;
       cairo_rectangle_int_t shape_bounds;
-      cairo_region_t *clip = priv->shadow_clip;
-      MetaWindow *window = priv->window;
+      cairo_region_t *clip = self->shadow_clip;
+      MetaWindow *window = self->window;
 
       meta_window_actor_get_shape_bounds (self, &shape_bounds);
       meta_window_actor_get_shadow_params (self, appears_focused, &params);
 
-      /* The frame bounds are already subtracted from priv->shadow_clip
+      /* The frame bounds are already subtracted from self->shadow_clip
        * if that exists.
        */
       if (!clip && clip_shadow_under_window (self))
         {
-          cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
+          cairo_region_t *frame_bounds = meta_window_get_frame_bounds (self->window);
           cairo_rectangle_int_t bounds;
 
           meta_window_actor_get_shadow_bounds (self, appears_focused, &bounds);
@@ -761,7 +729,7 @@ meta_window_actor_paint (ClutterActor *actor)
                          clip,
                          clip_shadow_under_window (self)); /* clip_strictly - not just as an optimization */
 
-      if (clip && clip != priv->shadow_clip)
+      if (clip && clip != self->shadow_clip)
         cairo_region_destroy (clip);
     }
 
@@ -773,14 +741,13 @@ meta_window_actor_get_paint_volume (ClutterActor       *actor,
                                     ClutterPaintVolume *volume)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (actor);
-  MetaWindowActorPrivate *priv = self->priv;
-  gboolean appears_focused = meta_window_appears_focused (priv->window);
+  gboolean appears_focused = meta_window_appears_focused (self->window);
 
   /* The paint volume is computed before paint functions are called
    * so our bounds might not be updated yet. Force an update. */
   meta_window_actor_handle_updates (self);
 
-  if (appears_focused ? priv->focused_shadow : priv->unfocused_shadow)
+  if (appears_focused ? self->focused_shadow : self->unfocused_shadow)
     {
       cairo_rectangle_int_t shadow_bounds;
       ClutterActorBox shadow_box;
@@ -801,11 +768,11 @@ meta_window_actor_get_paint_volume (ClutterActor       *actor,
       clutter_paint_volume_union_box (volume, &shadow_box);
     }
 
-  if (priv->surface)
+  if (self->surface)
     {
       const ClutterPaintVolume *child_volume;
 
-      child_volume = clutter_actor_get_transformed_paint_volume (CLUTTER_ACTOR (priv->surface), actor);
+      child_volume = clutter_actor_get_transformed_paint_volume (CLUTTER_ACTOR (self->surface), actor);
       if (!child_volume)
         return FALSE;
 
@@ -818,32 +785,30 @@ meta_window_actor_get_paint_volume (ClutterActor       *actor,
 static gboolean
 meta_window_actor_has_shadow (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->shadow_mode == META_SHADOW_MODE_FORCED_OFF)
+  if (self->shadow_mode == META_SHADOW_MODE_FORCED_OFF)
     return FALSE;
-  if (priv->shadow_mode == META_SHADOW_MODE_FORCED_ON)
+  if (self->shadow_mode == META_SHADOW_MODE_FORCED_ON)
     return TRUE;
 
   /* Leaving out shadows for maximized and fullscreen windows is an effeciency
    * win and also prevents the unsightly effect of the shadow of maximized
    * window appearing on an adjacent window */
-  if ((meta_window_get_maximized (priv->window) == META_MAXIMIZE_BOTH) ||
-      meta_window_is_fullscreen (priv->window))
+  if ((meta_window_get_maximized (self->window) == META_MAXIMIZE_BOTH) ||
+      meta_window_is_fullscreen (self->window))
     return FALSE;
 
   /*
    * If we have two snap-tiled windows, we don't want the shadow to obstruct
    * the other window.
    */
-  if (meta_window_get_tile_match (priv->window))
+  if (meta_window_get_tile_match (self->window))
     return FALSE;
 
   /*
    * Always put a shadow around windows with a frame - This should override
    * the restriction about not putting a shadow around ARGB windows.
    */
-  if (meta_window_get_frame (priv->window))
+  if (meta_window_get_frame (self->window))
     return TRUE;
 
   /*
@@ -857,7 +822,7 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
    * If a window specifies that it has custom frame extents, that likely
    * means that it is drawing a shadow itself. Don't draw our own.
    */
-  if (priv->window->has_custom_frame_extents)
+  if (self->window->has_custom_frame_extents)
     return FALSE;
 
   /*
@@ -877,7 +842,7 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
 MetaWindow *
 meta_window_actor_get_meta_window (MetaWindowActor *self)
 {
-  return self->priv->window;
+  return self->window;
 }
 
 /**
@@ -892,8 +857,8 @@ meta_window_actor_get_meta_window (MetaWindowActor *self)
 ClutterActor *
 meta_window_actor_get_texture (MetaWindowActor *self)
 {
-  if (self->priv->surface)
-    return CLUTTER_ACTOR (meta_surface_actor_get_texture (self->priv->surface));
+  if (self->surface)
+    return CLUTTER_ACTOR (meta_surface_actor_get_texture (self->surface));
   else
     return NULL;
 }
@@ -910,7 +875,7 @@ meta_window_actor_get_texture (MetaWindowActor *self)
 MetaSurfaceActor *
 meta_window_actor_get_surface (MetaWindowActor *self)
 {
-  return self->priv->surface;
+  return self->surface;
 }
 
 /**
@@ -924,17 +889,16 @@ meta_window_actor_get_surface (MetaWindowActor *self)
 gboolean
 meta_window_actor_is_destroyed (MetaWindowActor *self)
 {
-  return self->priv->disposed || self->priv->needs_destroy;
+  return self->disposed || self->needs_destroy;
 }
 
 static gboolean
 send_frame_messages_timeout (gpointer data)
 {
   MetaWindowActor *self = (MetaWindowActor *) data;
-  MetaWindowActorPrivate *priv = self->priv;
   GList *l;
 
-  for (l = priv->frames; l;)
+  for (l = self->frames; l;)
     {
       GList *l_next = l->next;
       FrameData *frame = l->data;
@@ -944,15 +908,15 @@ send_frame_messages_timeout (gpointer data)
           do_send_frame_drawn (self, frame);
           do_send_frame_timings (self, frame, 0, 0);
 
-          priv->frames = g_list_delete_link (priv->frames, l);
+          self->frames = g_list_delete_link (self->frames, l);
           frame_data_free (frame);
         }
 
       l = l_next;
     }
 
-  priv->needs_frame_drawn = FALSE;
-  priv->send_frame_messages_timer = 0;
+  self->needs_frame_drawn = FALSE;
+  self->send_frame_messages_timer = 0;
 
   return FALSE;
 }
@@ -960,15 +924,14 @@ send_frame_messages_timeout (gpointer data)
 static void
 queue_send_frame_messages_timeout (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
-  MetaDisplay *display = meta_window_get_display (priv->window);
+  MetaWindow *window = self->window;
+  MetaDisplay *display = meta_window_get_display (self->window);
   MetaLogicalMonitor *logical_monitor;
   int64_t current_time;
   float refresh_rate;
   int interval, offset;
 
-  if (priv->send_frame_messages_timer != 0)
+  if (self->send_frame_messages_timer != 0)
     return;
 
   logical_monitor = meta_window_get_main_logical_monitor (window);
@@ -992,21 +955,20 @@ queue_send_frame_messages_timeout (MetaWindowActor *self)
     meta_compositor_monotonic_time_to_server_time (display,
                                                    g_get_monotonic_time ());
   interval = (int)(1000000 / refresh_rate) * 6;
-  offset = MAX (0, priv->frame_drawn_time + interval - current_time) / 1000;
+  offset = MAX (0, self->frame_drawn_time + interval - current_time) / 1000;
 
  /* The clutter master clock source has already been added with META_PRIORITY_REDRAW,
   * so the timer will run *after* the clutter frame handling, if a frame is ready
   * to be drawn when the timer expires.
   */
-  priv->send_frame_messages_timer = g_timeout_add_full (META_PRIORITY_REDRAW, offset, 
send_frame_messages_timeout, self, NULL);
-  g_source_set_name_by_id (priv->send_frame_messages_timer, "[mutter] send_frame_messages_timeout");
+  self->send_frame_messages_timer = g_timeout_add_full (META_PRIORITY_REDRAW, offset, 
send_frame_messages_timeout, self, NULL);
+  g_source_set_name_by_id (self->send_frame_messages_timer, "[mutter] send_frame_messages_timeout");
 }
 
 void
 meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
                                      gboolean         no_delay_frame)
 {
-  MetaWindowActorPrivate *priv = self->priv;
   FrameData *frame;
 
   if (meta_window_actor_is_destroyed (self))
@@ -1015,11 +977,11 @@ meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
   frame = g_slice_new0 (FrameData);
   frame->frame_counter = -1;
 
-  priv->needs_frame_drawn = TRUE;
+  self->needs_frame_drawn = TRUE;
 
-  frame->sync_request_serial = priv->window->sync_request_serial;
+  frame->sync_request_serial = self->window->sync_request_serial;
 
-  priv->frames = g_list_prepend (priv->frames, frame);
+  self->frames = g_list_prepend (self->frames, frame);
 
   if (no_delay_frame)
     {
@@ -1027,12 +989,12 @@ meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
       clutter_stage_skip_sync_delay (CLUTTER_STAGE (stage));
     }
 
-  if (!priv->repaint_scheduled)
+  if (!self->repaint_scheduled)
     {
       gboolean is_obscured;
 
-      if (priv->surface)
-        is_obscured = meta_surface_actor_is_obscured (priv->surface);
+      if (self->surface)
+        is_obscured = meta_surface_actor_is_obscured (self->surface);
       else
         is_obscured = FALSE;
 
@@ -1050,11 +1012,11 @@ meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
         }
       else
         {
-          if (priv->surface)
+          if (self->surface)
             {
               const cairo_rectangle_int_t clip = { 0, 0, 1, 1 };
-              clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (priv->surface), &clip);
-              priv->repaint_scheduled = TRUE;
+              clutter_actor_queue_redraw_with_clip (CLUTTER_ACTOR (self->surface), &clip);
+              self->repaint_scheduled = TRUE;
             }
         }
     }
@@ -1063,10 +1025,10 @@ meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
 gboolean
 meta_window_actor_effect_in_progress (MetaWindowActor *self)
 {
-  return (self->priv->minimize_in_progress ||
-         self->priv->size_change_in_progress ||
-         self->priv->map_in_progress ||
-         self->priv->destroy_in_progress);
+  return (self->minimize_in_progress ||
+      self->size_change_in_progress ||
+      self->map_in_progress ||
+      self->destroy_in_progress);
 }
 
 static gboolean
@@ -1087,8 +1049,7 @@ static gboolean
 start_simple_effect (MetaWindowActor  *self,
                      MetaPluginEffect  event)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaCompositor *compositor = priv->compositor;
+  MetaCompositor *compositor = self->compositor;
   gint *counter = NULL;
   gboolean use_freeze_thaw = FALSE;
 
@@ -1099,16 +1060,16 @@ start_simple_effect (MetaWindowActor  *self,
   case META_PLUGIN_NONE:
     return FALSE;
   case META_PLUGIN_MINIMIZE:
-    counter = &priv->minimize_in_progress;
+    counter = &self->minimize_in_progress;
     break;
   case META_PLUGIN_UNMINIMIZE:
-    counter = &priv->unminimize_in_progress;
+    counter = &self->unminimize_in_progress;
     break;
   case META_PLUGIN_MAP:
-    counter = &priv->map_in_progress;
+    counter = &self->map_in_progress;
     break;
   case META_PLUGIN_DESTROY:
-    counter = &priv->destroy_in_progress;
+    counter = &self->destroy_in_progress;
     break;
   case META_PLUGIN_SIZE_CHANGE:
   case META_PLUGIN_SWITCH_WORKSPACE:
@@ -1139,9 +1100,7 @@ start_simple_effect (MetaWindowActor  *self,
 static void
 meta_window_actor_after_effects (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->needs_destroy)
+  if (self->needs_destroy)
     {
       clutter_actor_destroy (CLUTTER_ACTOR (self));
       return;
@@ -1156,12 +1115,11 @@ void
 meta_window_actor_effect_completed (MetaWindowActor  *self,
                                     MetaPluginEffect  event)
 {
-  MetaWindowActorPrivate *priv   = self->priv;
   gboolean inconsistent = FALSE;
 
   /* NB: Keep in mind that when effects get completed it possible
    * that the corresponding MetaWindow may have be been destroyed.
-   * In this case priv->window will == NULL */
+   * In this case self->window will == NULL */
 
   switch (event)
   {
@@ -1169,22 +1127,22 @@ meta_window_actor_effect_completed (MetaWindowActor  *self,
     break;
   case META_PLUGIN_MINIMIZE:
     {
-      priv->minimize_in_progress--;
-      if (priv->minimize_in_progress < 0)
-       {
-         g_warning ("Error in minimize accounting.");
-         priv->minimize_in_progress = 0;
+      self->minimize_in_progress--;
+      if (self->minimize_in_progress < 0)
+        {
+          g_warning ("Error in minimize accounting.");
+          self->minimize_in_progress = 0;
           inconsistent = TRUE;
-       }
+        }
     }
     break;
   case META_PLUGIN_UNMINIMIZE:
     {
-      priv->unminimize_in_progress--;
-      if (priv->unminimize_in_progress < 0)
+      self->unminimize_in_progress--;
+      if (self->unminimize_in_progress < 0)
        {
          g_warning ("Error in unminimize accounting.");
-         priv->unminimize_in_progress = 0;
+         self->unminimize_in_progress = 0;
          inconsistent = TRUE;
        }
     }
@@ -1194,31 +1152,31 @@ meta_window_actor_effect_completed (MetaWindowActor  *self,
      * Make sure that the actor is at the correct place in case
      * the plugin fscked.
      */
-    priv->map_in_progress--;
+    self->map_in_progress--;
 
-    if (priv->map_in_progress < 0)
+    if (self->map_in_progress < 0)
       {
-       g_warning ("Error in map accounting.");
-       priv->map_in_progress = 0;
+        g_warning ("Error in map accounting.");
+        self->map_in_progress = 0;
         inconsistent = TRUE;
       }
     break;
   case META_PLUGIN_DESTROY:
-    priv->destroy_in_progress--;
+    self->destroy_in_progress--;
 
-    if (priv->destroy_in_progress < 0)
+    if (self->destroy_in_progress < 0)
       {
-       g_warning ("Error in destroy accounting.");
-       priv->destroy_in_progress = 0;
+        g_warning ("Error in destroy accounting.");
+        self->destroy_in_progress = 0;
         inconsistent = TRUE;
       }
     break;
   case META_PLUGIN_SIZE_CHANGE:
-    priv->size_change_in_progress--;
-    if (priv->size_change_in_progress < 0)
+    self->size_change_in_progress--;
+    if (self->size_change_in_progress < 0)
       {
-       g_warning ("Error in size change accounting.");
-       priv->size_change_in_progress = 0;
+        g_warning ("Error in size change accounting.");
+        self->size_change_in_progress = 0;
         inconsistent = TRUE;
       }
     break;
@@ -1237,9 +1195,8 @@ meta_window_actor_effect_completed (MetaWindowActor  *self,
 gboolean
 meta_window_actor_should_unredirect (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  if (!meta_window_actor_is_destroyed (self) && priv->surface)
-    return meta_surface_actor_should_unredirect (priv->surface);
+  if (!meta_window_actor_is_destroyed (self) && self->surface)
+    return meta_surface_actor_should_unredirect (self->surface);
   else
     return FALSE;
 }
@@ -1248,25 +1205,22 @@ void
 meta_window_actor_set_unredirected (MetaWindowActor *self,
                                     gboolean         unredirected)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  g_assert(priv->surface); /* because otherwise should_unredirect() is FALSE */
-  meta_surface_actor_set_unredirected (priv->surface, unredirected);
+  g_assert(self->surface); /* because otherwise should_unredirect() is FALSE */
+  meta_surface_actor_set_unredirected (self->surface, unredirected);
 }
 
 void
 meta_window_actor_queue_destroy (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
   MetaWindowType window_type = meta_window_get_window_type (window);
 
   meta_window_set_compositor_private (window, NULL);
 
-  if (priv->send_frame_messages_timer != 0)
+  if (self->send_frame_messages_timer != 0)
     {
-      g_source_remove (priv->send_frame_messages_timer);
-      priv->send_frame_messages_timer = 0;
+      g_source_remove (self->send_frame_messages_timer);
+      self->send_frame_messages_timer = 0;
     }
 
   if (window_type == META_WINDOW_DROPDOWN_MENU ||
@@ -1284,7 +1238,7 @@ meta_window_actor_queue_destroy (MetaWindowActor *self)
       return;
     }
 
-  priv->needs_destroy = TRUE;
+  self->needs_destroy = TRUE;
 
   if (!meta_window_actor_effect_in_progress (self))
     clutter_actor_destroy (CLUTTER_ACTOR (self));
@@ -1294,15 +1248,14 @@ void
 meta_window_actor_sync_actor_geometry (MetaWindowActor *self,
                                        gboolean         did_placement)
 {
-  MetaWindowActorPrivate *priv = self->priv;
   MetaRectangle window_rect;
 
-  meta_window_get_buffer_rect (priv->window, &window_rect);
+  meta_window_get_buffer_rect (self->window, &window_rect);
 
   /* When running as a Wayland compositor we catch size changes when new
    * buffers are attached */
-  if (META_IS_SURFACE_ACTOR_X11 (priv->surface))
-    meta_surface_actor_x11_set_size (META_SURFACE_ACTOR_X11 (priv->surface),
+  if (META_IS_SURFACE_ACTOR_X11 (self->surface))
+    meta_surface_actor_x11_set_size (META_SURFACE_ACTOR_X11 (self->surface),
                                      window_rect.width, window_rect.height);
 
   /* Normally we want freezing a window to also freeze its position; this allows
@@ -1328,13 +1281,12 @@ void
 meta_window_actor_show (MetaWindowActor   *self,
                         MetaCompEffect     effect)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaCompositor *compositor = priv->compositor;
+  MetaCompositor *compositor = self->compositor;
   MetaPluginEffect event;
 
-  g_return_if_fail (!priv->visible);
+  g_return_if_fail (!self->visible);
 
-  self->priv->visible = TRUE;
+  self->visible = TRUE;
 
   switch (effect)
     {
@@ -1362,13 +1314,12 @@ void
 meta_window_actor_hide (MetaWindowActor *self,
                         MetaCompEffect   effect)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaCompositor *compositor = priv->compositor;
+  MetaCompositor *compositor = self->compositor;
   MetaPluginEffect event;
 
-  g_return_if_fail (priv->visible);
+  g_return_if_fail (self->visible);
 
-  priv->visible = FALSE;
+  self->visible = FALSE;
 
   /* If a plugin is animating a workspace transition, we have to
    * hold off on hiding the window, and do it after the workspace
@@ -1402,16 +1353,15 @@ meta_window_actor_size_change (MetaWindowActor    *self,
                                MetaRectangle      *old_frame_rect,
                                MetaRectangle      *old_buffer_rect)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaCompositor *compositor = priv->compositor;
+  MetaCompositor *compositor = self->compositor;
 
-  self->priv->size_change_in_progress++;
+  self->size_change_in_progress++;
   meta_window_actor_freeze (self);
 
   if (!meta_plugin_manager_event_size_change (compositor->plugin_mgr, self,
                                               which_change, old_frame_rect, old_buffer_rect))
     {
-      self->priv->size_change_in_progress--;
+      self->size_change_in_progress--;
       meta_window_actor_thaw (self);
     }
 }
@@ -1422,29 +1372,26 @@ meta_window_actor_new (MetaWindow *window)
   MetaDisplay *display = meta_window_get_display (window);
   MetaCompositor *compositor = display->compositor;
   MetaWindowActor        *self;
-  MetaWindowActorPrivate *priv;
   ClutterActor           *window_group;
 
   self = g_object_new (META_TYPE_WINDOW_ACTOR,
                        "meta-window", window,
                        NULL);
 
-  priv = self->priv;
-
   meta_window_actor_sync_updates_frozen (self);
 
   if (is_frozen (self))
-    priv->first_frame_state = INITIALLY_FROZEN;
+    self->first_frame_state = INITIALLY_FROZEN;
   else
-    priv->first_frame_state = DRAWING_FIRST_FRAME;
+    self->first_frame_state = DRAWING_FIRST_FRAME;
 
   /* 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)
+  if (self->window->extended_sync_request_counter && !self->updates_frozen)
     meta_window_actor_queue_frame_drawn (self, FALSE);
 
-  meta_window_actor_sync_actor_geometry (self, priv->window->placed);
+  meta_window_actor_sync_actor_geometry (self, self->window->placed);
 
   /* Hang our compositor window state off the MetaWindow for fast retrieval */
   meta_window_set_compositor_private (window, G_OBJECT (self));
@@ -1523,25 +1470,24 @@ static void
 meta_window_actor_set_clip_region_beneath (MetaWindowActor *self,
                                            cairo_region_t  *beneath_region)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  gboolean appears_focused = meta_window_appears_focused (priv->window);
+  gboolean appears_focused = meta_window_appears_focused (self->window);
 
-  if (appears_focused ? priv->focused_shadow : priv->unfocused_shadow)
+  if (appears_focused ? self->focused_shadow : self->unfocused_shadow)
     {
-      g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
+      g_clear_pointer (&self->shadow_clip, cairo_region_destroy);
 
       if (beneath_region)
         {
-          priv->shadow_clip = cairo_region_copy (beneath_region);
+          self->shadow_clip = cairo_region_copy (beneath_region);
 
           if (clip_shadow_under_window (self))
             {
-              cairo_region_t *frame_bounds = meta_window_get_frame_bounds (priv->window);
-              cairo_region_subtract (priv->shadow_clip, frame_bounds);
+              cairo_region_t *frame_bounds = meta_window_get_frame_bounds (self->window);
+              cairo_region_subtract (self->shadow_clip, frame_bounds);
             }
         }
       else
-        priv->shadow_clip = NULL;
+        self->shadow_clip = NULL;
     }
 }
 
@@ -1560,9 +1506,8 @@ static void
 meta_window_actor_reset_culling (MetaCullable *cullable)
 {
   MetaWindowActor *self = META_WINDOW_ACTOR (cullable);
-  MetaWindowActorPrivate *priv = self->priv;
 
-  g_clear_pointer (&priv->shadow_clip, cairo_region_destroy);
+  g_clear_pointer (&self->shadow_clip, cairo_region_destroy);
 
   meta_cullable_reset_culling_children (cullable);
 }
@@ -1577,7 +1522,6 @@ cullable_iface_init (MetaCullableInterface *iface)
 static void
 check_needs_shadow (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
   MetaShadow *old_shadow = NULL;
   MetaShadow **shadow_location;
   gboolean recompute_shadow;
@@ -1588,23 +1532,23 @@ check_needs_shadow (MetaWindowActor *self)
    * and avoids the need to explicitly handle window type changes, which
    * we would do if tried to keep track of when we might be adding or removing
    * a shadow more explicitly. We only keep track of changes to the *shape* of
-   * the shadow with priv->recompute_shadow.
+   * the shadow with self->recompute_shadow.
    */
 
   should_have_shadow = meta_window_actor_has_shadow (self);
-  appears_focused = meta_window_appears_focused (priv->window);
+  appears_focused = meta_window_appears_focused (self->window);
 
   if (appears_focused)
     {
-      recompute_shadow = priv->recompute_focused_shadow;
-      priv->recompute_focused_shadow = FALSE;
-      shadow_location = &priv->focused_shadow;
+      recompute_shadow = self->recompute_focused_shadow;
+      self->recompute_focused_shadow = FALSE;
+      shadow_location = &self->focused_shadow;
     }
   else
     {
-      recompute_shadow = priv->recompute_unfocused_shadow;
-      priv->recompute_unfocused_shadow = FALSE;
-      shadow_location = &priv->unfocused_shadow;
+      recompute_shadow = self->recompute_unfocused_shadow;
+      self->recompute_unfocused_shadow = FALSE;
+      shadow_location = &self->unfocused_shadow;
     }
 
   if (!should_have_shadow || recompute_shadow)
@@ -1618,8 +1562,8 @@ check_needs_shadow (MetaWindowActor *self)
 
   if (*shadow_location == NULL && should_have_shadow)
     {
-      if (priv->shadow_shape == NULL)
-        priv->shadow_shape = meta_window_shape_new (priv->shape_region);
+      if (self->shadow_shape == NULL)
+        self->shadow_shape = meta_window_shape_new (self->shape_region);
 
       MetaShadowFactory *factory = meta_shadow_factory_get_default ();
       const char *shadow_class = meta_window_actor_get_shadow_class (self);
@@ -1627,7 +1571,7 @@ check_needs_shadow (MetaWindowActor *self)
 
       meta_window_actor_get_shape_bounds (self, &shape_bounds);
       *shadow_location = meta_shadow_factory_get_shadow (factory,
-                                                         priv->shadow_shape,
+                                                         self->shadow_shape,
                                                          shape_bounds.width, shape_bounds.height,
                                                          shadow_class, appears_focused);
     }
@@ -1640,10 +1584,8 @@ void
 meta_window_actor_process_x11_damage (MetaWindowActor    *self,
                                       XDamageNotifyEvent *event)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (priv->surface)
-    meta_surface_actor_process_damage (priv->surface,
+  if (self->surface)
+    meta_surface_actor_process_damage (self->surface,
                                        event->area.x,
                                        event->area.y,
                                        event->area.width,
@@ -1653,11 +1595,9 @@ meta_window_actor_process_x11_damage (MetaWindowActor    *self,
 void
 meta_window_actor_sync_visibility (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (CLUTTER_ACTOR_IS_VISIBLE (self) != priv->visible)
+  if (CLUTTER_ACTOR_IS_VISIBLE (self) != self->visible)
     {
-      if (priv->visible)
+      if (self->visible)
         clutter_actor_show (CLUTTER_ACTOR (self));
       else
         clutter_actor_hide (CLUTTER_ACTOR (self));
@@ -1708,7 +1648,6 @@ build_and_scan_frame_mask (MetaWindowActor       *self,
 {
   ClutterBackend *backend = clutter_get_default_backend ();
   CoglContext *ctx = clutter_backend_get_cogl_context (backend);
-  MetaWindowActorPrivate *priv = self->priv;
   guchar *mask_data;
   guint tex_width, tex_height;
   MetaShapedTexture *stex;
@@ -1717,7 +1656,7 @@ build_and_scan_frame_mask (MetaWindowActor       *self,
   cairo_t *cr;
   cairo_surface_t *surface;
 
-  stex = meta_surface_actor_get_texture (priv->surface);
+  stex = meta_surface_actor_get_texture (self->surface);
   g_return_if_fail (stex);
 
   meta_shaped_texture_set_mask_texture (stex, NULL);
@@ -1744,7 +1683,7 @@ build_and_scan_frame_mask (MetaWindowActor       *self,
   gdk_cairo_region (cr, shape_region);
   cairo_fill (cr);
 
-  if (priv->window->frame != NULL)
+  if (self->window->frame != NULL)
     {
       cairo_region_t *frame_paint_region, *scanned_region;
       cairo_rectangle_int_t rect = { 0, 0, tex_width, tex_height };
@@ -1756,7 +1695,7 @@ build_and_scan_frame_mask (MetaWindowActor       *self,
       gdk_cairo_region (cr, frame_paint_region);
       cairo_clip (cr);
 
-      meta_frame_get_mask (priv->window->frame, cr);
+      meta_frame_get_mask (self->window->frame, cr);
 
       cairo_surface_flush (surface);
       scanned_region = scan_visible_region (mask_data, stride, frame_paint_region);
@@ -1805,20 +1744,19 @@ build_and_scan_frame_mask (MetaWindowActor       *self,
 static void
 meta_window_actor_update_shape_region (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
   cairo_region_t *region = NULL;
   cairo_rectangle_int_t client_area;
 
-  meta_window_get_client_area_rect (priv->window, &client_area);
+  meta_window_get_client_area_rect (self->window, &client_area);
 
-  if (priv->window->frame != NULL && priv->window->shape_region != NULL)
+  if (self->window->frame != NULL && self->window->shape_region != NULL)
     {
-      region = cairo_region_copy (priv->window->shape_region);
+      region = cairo_region_copy (self->window->shape_region);
       cairo_region_translate (region, client_area.x, client_area.y);
     }
-  else if (priv->window->shape_region != NULL)
+  else if (self->window->shape_region != NULL)
     {
-      region = cairo_region_reference (priv->window->shape_region);
+      region = cairo_region_reference (self->window->shape_region);
     }
   else
     {
@@ -1828,13 +1766,13 @@ meta_window_actor_update_shape_region (MetaWindowActor *self)
       region = cairo_region_create_rectangle (&client_area);
     }
 
-  if ((priv->window->shape_region != NULL) || (priv->window->frame != NULL))
+  if ((self->window->shape_region != NULL) || (self->window->frame != NULL))
     build_and_scan_frame_mask (self, &client_area, region);
 
-  g_clear_pointer (&priv->shape_region, cairo_region_destroy);
-  priv->shape_region = region;
+  g_clear_pointer (&self->shape_region, cairo_region_destroy);
+  self->shape_region = region;
 
-  g_clear_pointer (&priv->shadow_shape, meta_window_shape_unref);
+  g_clear_pointer (&self->shadow_shape, meta_window_shape_unref);
 
   meta_window_actor_invalidate_shadow (self);
 }
@@ -1842,8 +1780,7 @@ meta_window_actor_update_shape_region (MetaWindowActor *self)
 static void
 meta_window_actor_update_input_region (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
   cairo_region_t *region;
 
   if (window->shape_region && window->input_region)
@@ -1858,22 +1795,21 @@ meta_window_actor_update_input_region (MetaWindowActor *self)
   else
     region = NULL;
 
-  meta_surface_actor_set_input_region (priv->surface, region);
+  meta_surface_actor_set_input_region (self->surface, region);
   cairo_region_destroy (region);
 }
 
 static void
 meta_window_actor_update_opaque_region (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
   cairo_region_t *opaque_region;
   gboolean argb32 = is_argb32 (self);
 
-  if (argb32 && priv->window->opaque_region != NULL)
+  if (argb32 && self->window->opaque_region != NULL)
     {
       cairo_rectangle_int_t client_area;
 
-      meta_window_get_client_area_rect (priv->window, &client_area);
+      meta_window_get_client_area_rect (self->window, &client_area);
 
       /* The opaque region is defined to be a part of the
        * window which ARGB32 will always paint with opaque
@@ -1885,56 +1821,50 @@ meta_window_actor_update_opaque_region (MetaWindowActor *self)
        * to be undefined, and considered a client bug. In mutter's
        * case, graphical glitches will occur.
        */
-      opaque_region = cairo_region_copy (priv->window->opaque_region);
+      opaque_region = cairo_region_copy (self->window->opaque_region);
       cairo_region_translate (opaque_region, client_area.x, client_area.y);
-      cairo_region_intersect (opaque_region, priv->shape_region);
+      cairo_region_intersect (opaque_region, self->shape_region);
     }
   else if (argb32)
     opaque_region = NULL;
   else
-    opaque_region = cairo_region_reference (priv->shape_region);
+    opaque_region = cairo_region_reference (self->shape_region);
 
-  meta_surface_actor_set_opaque_region (priv->surface, opaque_region);
+  meta_surface_actor_set_opaque_region (self->surface, opaque_region);
   cairo_region_destroy (opaque_region);
 }
 
 static void
 check_needs_reshape (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  if (!priv->needs_reshape)
+  if (!self->needs_reshape)
     return;
 
   meta_window_actor_update_shape_region (self);
 
-  if (priv->window->client_type == META_WINDOW_CLIENT_TYPE_X11)
+  if (self->window->client_type == META_WINDOW_CLIENT_TYPE_X11)
     {
       meta_window_actor_update_input_region (self);
       meta_window_actor_update_opaque_region (self);
     }
 
-  priv->needs_reshape = FALSE;
+  self->needs_reshape = FALSE;
 }
 
 void
 meta_window_actor_update_shape (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  priv->needs_reshape = TRUE;
+  self->needs_reshape = TRUE;
 
   if (is_frozen (self))
     return;
 
-  clutter_actor_queue_redraw (CLUTTER_ACTOR (priv->surface));
+  clutter_actor_queue_redraw (CLUTTER_ACTOR (self->surface));
 }
 
 static void
 meta_window_actor_handle_updates (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
   if (is_frozen (self))
     {
       /* The window is frozen due to a pending animation: we'll wait until
@@ -1942,12 +1872,12 @@ meta_window_actor_handle_updates (MetaWindowActor *self)
       return;
     }
 
-  if (meta_surface_actor_is_unredirected (priv->surface))
+  if (meta_surface_actor_is_unredirected (self->surface))
     return;
 
-  meta_surface_actor_pre_paint (priv->surface);
+  meta_surface_actor_pre_paint (self->surface);
 
-  if (!meta_surface_actor_is_visible (priv->surface))
+  if (!meta_surface_actor_is_visible (self->surface))
     return;
 
   check_needs_reshape (self);
@@ -1968,18 +1898,17 @@ meta_window_actor_pre_paint (MetaWindowActor *self)
 static void
 do_send_frame_drawn (MetaWindowActor *self, FrameData *frame)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaDisplay *display = meta_window_get_display (priv->window);
+  MetaDisplay *display = meta_window_get_display (self->window);
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
 
   XClientMessageEvent ev = { 0, };
 
   frame->frame_drawn_time = meta_compositor_monotonic_time_to_server_time (display,
                                                                            g_get_monotonic_time ());
-  priv->frame_drawn_time = frame->frame_drawn_time;
+  self->frame_drawn_time = frame->frame_drawn_time;
 
   ev.type = ClientMessage;
-  ev.window = meta_window_get_xwindow (priv->window);
+  ev.window = meta_window_get_xwindow (self->window);
   ev.message_type = display->x11_display->atom__NET_WM_FRAME_DRAWN;
   ev.format = 32;
   ev.data.l[0] = frame->sync_request_serial & G_GUINT64_CONSTANT(0xffffffff);
@@ -1996,9 +1925,7 @@ do_send_frame_drawn (MetaWindowActor *self, FrameData *frame)
 void
 meta_window_actor_post_paint (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  priv->repaint_scheduled = FALSE;
+  self->repaint_scheduled = FALSE;
 
   if (meta_window_actor_is_destroyed (self))
     return;
@@ -2007,12 +1934,12 @@ meta_window_actor_post_paint (MetaWindowActor *self)
    * it is obscured, we should wait until timer expiration before
    * sending _NET_WM_FRAME_* messages.
    */
-  if (priv->send_frame_messages_timer == 0 &&
-      priv->needs_frame_drawn)
+  if (self->send_frame_messages_timer == 0 &&
+      self->needs_frame_drawn)
     {
       GList *l;
 
-      for (l = priv->frames; l; l = l->next)
+      for (l = self->frames; l; l = l->next)
         {
           FrameData *frame = l->data;
 
@@ -2020,12 +1947,12 @@ meta_window_actor_post_paint (MetaWindowActor *self)
             do_send_frame_drawn (self, frame);
         }
 
-      priv->needs_frame_drawn = FALSE;
+      self->needs_frame_drawn = FALSE;
     }
 
-  if (priv->first_frame_state == DRAWING_FIRST_FRAME)
+  if (self->first_frame_state == DRAWING_FIRST_FRAME)
     {
-      priv->first_frame_state = EMITTED_FIRST_FRAME;
+      self->first_frame_state = EMITTED_FIRST_FRAME;
       g_signal_emit (self, signals[FIRST_FRAME], 0);
     }
 }
@@ -2036,14 +1963,13 @@ do_send_frame_timings (MetaWindowActor  *self,
                        gint             refresh_interval,
                        gint64           presentation_time)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaDisplay *display = meta_window_get_display (priv->window);
+  MetaDisplay *display = meta_window_get_display (self->window);
   Display *xdisplay = meta_x11_display_get_xdisplay (display->x11_display);
 
   XClientMessageEvent ev = { 0, };
 
   ev.type = ClientMessage;
-  ev.window = meta_window_get_xwindow (priv->window);
+  ev.window = meta_window_get_xwindow (self->window);
   ev.message_type = display->x11_display->atom__NET_WM_FRAME_TIMINGS;
   ev.format = 32;
   ev.data.l[0] = frame->sync_request_serial & G_GUINT64_CONSTANT(0xffffffff);
@@ -2094,13 +2020,12 @@ meta_window_actor_frame_complete (MetaWindowActor  *self,
                                   ClutterFrameInfo *frame_info,
                                   gint64            presentation_time)
 {
-  MetaWindowActorPrivate *priv = self->priv;
   GList *l;
 
   if (meta_window_actor_is_destroyed (self))
     return;
 
-  for (l = priv->frames; l;)
+  for (l = self->frames; l;)
     {
       GList *l_next = l->next;
       FrameData *frame = l->data;
@@ -2110,12 +2035,12 @@ meta_window_actor_frame_complete (MetaWindowActor  *self,
         {
           if (G_UNLIKELY (frame->frame_drawn_time == 0))
             g_warning ("%s: Frame has assigned frame counter but no frame drawn time",
-                       priv->window->desc);
+                       self->window->desc);
           if (G_UNLIKELY (frame->frame_counter < frame_counter))
             g_warning ("%s: frame_complete callback never occurred for frame %" G_GINT64_FORMAT,
-                       priv->window->desc, frame->frame_counter);
+                       self->window->desc, frame->frame_counter);
 
-          priv->frames = g_list_delete_link (priv->frames, l);
+          self->frames = g_list_delete_link (self->frames, l);
           send_frame_timings (self, frame, frame_info, presentation_time);
           frame_data_free (frame);
         }
@@ -2127,10 +2052,8 @@ meta_window_actor_frame_complete (MetaWindowActor  *self,
 void
 meta_window_actor_invalidate_shadow (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
-  priv->recompute_focused_shadow = TRUE;
-  priv->recompute_unfocused_shadow = TRUE;
+  self->recompute_focused_shadow = TRUE;
+  self->recompute_unfocused_shadow = TRUE;
 
   if (is_frozen (self))
     return;
@@ -2141,24 +2064,21 @@ meta_window_actor_invalidate_shadow (MetaWindowActor *self)
 void
 meta_window_actor_update_opacity (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
 
-  if (priv->surface)
-    clutter_actor_set_opacity (CLUTTER_ACTOR (priv->surface), window->opacity);
+  if (self->surface)
+    clutter_actor_set_opacity (CLUTTER_ACTOR (self->surface), window->opacity);
 }
 
 static void
 meta_window_actor_set_updates_frozen (MetaWindowActor *self,
                                       gboolean         updates_frozen)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-
   updates_frozen = updates_frozen != FALSE;
 
-  if (priv->updates_frozen != updates_frozen)
+  if (self->updates_frozen != updates_frozen)
     {
-      priv->updates_frozen = updates_frozen;
+      self->updates_frozen = updates_frozen;
       if (updates_frozen)
         meta_window_actor_freeze (self);
       else
@@ -2169,8 +2089,7 @@ meta_window_actor_set_updates_frozen (MetaWindowActor *self,
 void
 meta_window_actor_sync_updates_frozen (MetaWindowActor *self)
 {
-  MetaWindowActorPrivate *priv = self->priv;
-  MetaWindow *window = priv->window;
+  MetaWindow *window = self->window;
 
   meta_window_actor_set_updates_frozen (self, meta_window_updates_are_frozen (window));
 }
diff --git a/src/meta/meta-background-actor.h b/src/meta/meta-background-actor.h
index 6885a0ee1..ff601676f 100644
--- a/src/meta/meta-background-actor.h
+++ b/src/meta/meta-background-actor.h
@@ -34,31 +34,12 @@
  * the background that are obscured by other windows.
  */
 
-#define META_TYPE_BACKGROUND_ACTOR            (meta_background_actor_get_type ())
-#define META_BACKGROUND_ACTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_BACKGROUND_ACTOR, MetaBackgroundActor))
-#define META_BACKGROUND_ACTOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKGROUND_ACTOR, 
MetaBackgroundActorClass))
-#define META_IS_BACKGROUND_ACTOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_BACKGROUND_ACTOR))
-#define META_IS_BACKGROUND_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKGROUND_ACTOR))
-#define META_BACKGROUND_ACTOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKGROUND_ACTOR, 
MetaBackgroundActorClass))
+#define META_TYPE_BACKGROUND_ACTOR (meta_background_actor_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBackgroundActor,
+                      meta_background_actor,
+                      META, BACKGROUND_ACTOR,
+                      ClutterActor)
 
-typedef struct _MetaBackgroundActor        MetaBackgroundActor;
-typedef struct _MetaBackgroundActorClass   MetaBackgroundActorClass;
-typedef struct _MetaBackgroundActorPrivate MetaBackgroundActorPrivate;
-
-struct _MetaBackgroundActorClass
-{
-  /*< private >*/
-  ClutterActorClass parent_class;
-};
-
-struct _MetaBackgroundActor
-{
-  ClutterActor parent;
-
-  MetaBackgroundActorPrivate *priv;
-};
-
-GType meta_background_actor_get_type (void);
 
 ClutterActor *meta_background_actor_new    (MetaDisplay *display,
                                             int          monitor);
diff --git a/src/meta/meta-background-group.h b/src/meta/meta-background-group.h
index 14bb0814c..7eb26b31c 100644
--- a/src/meta/meta-background-group.h
+++ b/src/meta/meta-background-group.h
@@ -5,32 +5,11 @@
 
 #include "clutter/clutter.h"
 
-#define META_TYPE_BACKGROUND_GROUP            (meta_background_group_get_type ())
-#define META_BACKGROUND_GROUP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_BACKGROUND_GROUP, MetaBackgroundGroup))
-#define META_BACKGROUND_GROUP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKGROUND_GROUP, 
MetaBackgroundGroupClass))
-#define META_IS_BACKGROUND_GROUP(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_BACKGROUND_GROUP))
-#define META_IS_BACKGROUND_GROUP_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), 
META_TYPE_BACKGROUND_GROUP))
-#define META_BACKGROUND_GROUP_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKGROUND_GROUP, 
MetaBackgroundGroupClass))
-
-typedef struct _MetaBackgroundGroup        MetaBackgroundGroup;
-typedef struct _MetaBackgroundGroupClass   MetaBackgroundGroupClass;
-typedef struct _MetaBackgroundGroupPrivate MetaBackgroundGroupPrivate;
-
-struct _MetaBackgroundGroupClass
-{
-  /*< private >*/
-  ClutterActorClass parent_class;
-};
-
-struct _MetaBackgroundGroup
-{
-  /*< private >*/
-  ClutterActor parent;
-
-  MetaBackgroundGroupPrivate *priv;
-};
-
-GType meta_background_group_get_type (void);
+#define META_TYPE_BACKGROUND_GROUP (meta_background_group_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBackgroundGroup,
+                      meta_background_group,
+                      META, BACKGROUND_GROUP,
+                      ClutterActor)
 
 ClutterActor *meta_background_group_new (void);
 
diff --git a/src/meta/meta-background-image.h b/src/meta/meta-background-image.h
index de018bd1e..b2e2175bd 100644
--- a/src/meta/meta-background-image.h
+++ b/src/meta/meta-background-image.h
@@ -29,48 +29,25 @@
 #include "cogl/cogl.h"
 #include "meta/display.h"
 
-#define META_TYPE_BACKGROUND_IMAGE            (meta_background_image_get_type ())
-#define META_BACKGROUND_IMAGE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_BACKGROUND_IMAGE, MetaBackgroundImage))
-#define META_BACKGROUND_IMAGE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_BACKGROUND_IMAGE, MetaBackgroundImageClass))
-#define META_IS_BACKGROUND_IMAGE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_BACKGROUND_IMAGE))
-#define META_IS_BACKGROUND_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_BACKGROUND_IMAGE))
-#define META_BACKGROUND_IMAGE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_BACKGROUND_IMAGE, MetaBackgroundImageClass))
-
-/**
- * MetaBackgroundImage:
- *
- * #MetaBackgroundImage is an object that represents a loaded or loading background image.
- */
-typedef struct _MetaBackgroundImage      MetaBackgroundImage;
-typedef struct _MetaBackgroundImageClass MetaBackgroundImageClass;
-
-GType meta_background_image_get_type (void);
+#define META_TYPE_BACKGROUND_IMAGE (meta_background_image_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBackgroundImage,
+                      meta_background_image,
+                      META, BACKGROUND_IMAGE,
+                      GObject)
 
 gboolean     meta_background_image_is_loaded   (MetaBackgroundImage *image);
 gboolean     meta_background_image_get_success (MetaBackgroundImage *image);
 CoglTexture *meta_background_image_get_texture (MetaBackgroundImage *image);
 
-#define META_TYPE_BACKGROUND_IMAGE_CACHE            (meta_background_image_cache_get_type ())
-#define META_BACKGROUND_IMAGE_CACHE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
META_TYPE_BACKGROUND_IMAGE_CACHE, MetaBackgroundImageCache))
-#define META_BACKGROUND_IMAGE_CACHE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  
META_TYPE_BACKGROUND_IMAGE_CACHE, MetaBackgroundImageCacheClass))
-#define META_IS_BACKGROUND_IMAGE_CACHE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
META_TYPE_BACKGROUND_IMAGE_CACHE))
-#define META_IS_BACKGROUND_IMAGE_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  
META_TYPE_BACKGROUND_IMAGE_CACHE))
-#define META_BACKGROUND_IMAGE_CACHE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  
META_TYPE_BACKGROUND_IMAGE_CACHE, MetaBackgroundImageCacheClass))
 
-/**
- * MetaBackgroundImageCache:
- *
- * #MetaBackgroundImageCache caches loading of textures for backgrounds; there's actually
- * nothing background specific about it, other than it is tuned to work well for
- * large images as typically are used for backgrounds.
- */
-typedef struct _MetaBackgroundImageCache      MetaBackgroundImageCache;
-typedef struct _MetaBackgroundImageCacheClass MetaBackgroundImageCacheClass;
+#define META_TYPE_BACKGROUND_IMAGE_CACHE (meta_background_image_cache_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBackgroundImageCache,
+                      meta_background_image_cache,
+                      META, BACKGROUND_IMAGE_CACHE,
+                      GObject)
 
 MetaBackgroundImageCache *meta_background_image_cache_get_default (void);
 
-GType meta_background_image_cache_get_type (void);
-
 MetaBackgroundImage *meta_background_image_cache_load  (MetaBackgroundImageCache *cache,
                                                         GFile                    *file);
 void                 meta_background_image_cache_purge (MetaBackgroundImageCache *cache,
diff --git a/src/meta/meta-background.h b/src/meta/meta-background.h
index 7c7c3c673..0a94d5e49 100644
--- a/src/meta/meta-background.h
+++ b/src/meta/meta-background.h
@@ -34,34 +34,15 @@
  * the background that are obscured by other windows.
  */
 
-#define META_TYPE_BACKGROUND            (meta_background_get_type ())
-#define META_BACKGROUND(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_BACKGROUND, 
MetaBackground))
-#define META_BACKGROUND_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_BACKGROUND, 
MetaBackgroundClass))
-#define META_IS_BACKGROUND(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_BACKGROUND))
-#define META_IS_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_BACKGROUND))
-#define META_BACKGROUND_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_BACKGROUND, 
MetaBackgroundClass))
+#define META_TYPE_BACKGROUND (meta_background_get_type ())
+G_DECLARE_FINAL_TYPE (MetaBackground,
+                      meta_background,
+                      META, BACKGROUND,
+                      GObject)
 
-typedef struct _MetaBackground        MetaBackground;
-typedef struct _MetaBackgroundClass   MetaBackgroundClass;
-typedef struct _MetaBackgroundPrivate MetaBackgroundPrivate;
-
-struct _MetaBackgroundClass
-{
-  /*< private >*/
-  GObjectClass parent_class;
-};
-
-struct _MetaBackground
-{
-  GObject parent;
-
-  MetaBackgroundPrivate *priv;
-};
 
 void meta_background_refresh_all (void);
 
-GType meta_background_get_type (void);
-
 MetaBackground *meta_background_new (MetaDisplay *display);
 
 void meta_background_set_color    (MetaBackground            *self,
diff --git a/src/meta/meta-cursor-tracker.h b/src/meta/meta-cursor-tracker.h
index 735fa5810..8234dbbe4 100644
--- a/src/meta/meta-cursor-tracker.h
+++ b/src/meta/meta-cursor-tracker.h
@@ -29,16 +29,12 @@
 #include "meta/types.h"
 #include "meta/workspace.h"
 
-#define META_TYPE_CURSOR_TRACKER            (meta_cursor_tracker_get_type ())
-#define META_CURSOR_TRACKER(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_CURSOR_TRACKER, 
MetaCursorTracker))
-#define META_CURSOR_TRACKER_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_CURSOR_TRACKER, 
MetaCursorTrackerClass))
-#define META_IS_CURSOR_TRACKER(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_CURSOR_TRACKER))
-#define META_IS_CURSOR_TRACKER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  META_TYPE_CURSOR_TRACKER))
-#define META_CURSOR_TRACKER_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  META_TYPE_CURSOR_TRACKER, 
MetaCursorTrackerClass))
+#define META_TYPE_CURSOR_TRACKER (meta_cursor_tracker_get_type ())
+G_DECLARE_FINAL_TYPE (MetaCursorTracker,
+                      meta_cursor_tracker,
+                      META, CURSOR_TRACKER,
+                      GObject)
 
-typedef struct _MetaCursorTrackerClass   MetaCursorTrackerClass;
-
-GType meta_cursor_tracker_get_type (void);
 
 MetaCursorTracker *meta_cursor_tracker_get_for_display (MetaDisplay *display);
 
diff --git a/src/meta/meta-shadow-factory.h b/src/meta/meta-shadow-factory.h
index 4aa1fc386..e91af162e 100644
--- a/src/meta/meta-shadow-factory.h
+++ b/src/meta/meta-shadow-factory.h
@@ -57,27 +57,14 @@ struct _MetaShadowParams
   guint8 opacity;
 };
 
-#define META_TYPE_SHADOW_FACTORY            (meta_shadow_factory_get_type ())
-#define META_SHADOW_FACTORY(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_SHADOW_FACTORY, 
MetaShadowFactory))
-#define META_SHADOW_FACTORY_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass),  META_TYPE_SHADOW_FACTORY, 
MetaShadowFactoryClass))
-#define META_IS_SHADOW_FACTORY(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_SHADOW_FACTORY))
-#define META_IS_SHADOW_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),  META_TYPE_SHADOW_FACTORY))
-#define META_SHADOW_FACTORY_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj),  META_TYPE_SHADOW_FACTORY, 
MetaShadowFactoryClass))
-
-/**
- * MetaShadowFactory:
- *
- * #MetaShadowFactory is used to create window shadows. It caches shadows internally
- * so that multiple shadows created for the same shape with the same radius will
- * share the same MetaShadow.
- */
-typedef struct _MetaShadowFactory      MetaShadowFactory;
-typedef struct _MetaShadowFactoryClass MetaShadowFactoryClass;
+#define META_TYPE_SHADOW_FACTORY (meta_shadow_factory_get_type ())
+G_DECLARE_FINAL_TYPE (MetaShadowFactory,
+                      meta_shadow_factory,
+                      META, SHADOW_FACTORY,
+                      GObject)
 
 MetaShadowFactory *meta_shadow_factory_get_default (void);
 
-GType meta_shadow_factory_get_type (void);
-
 void meta_shadow_factory_set_params (MetaShadowFactory *factory,
                                      const char        *class_name,
                                      gboolean           focused,
diff --git a/src/meta/meta-shaped-texture.h b/src/meta/meta-shaped-texture.h
index dc568a743..76f8d50c6 100644
--- a/src/meta/meta-shaped-texture.h
+++ b/src/meta/meta-shaped-texture.h
@@ -30,56 +30,30 @@
 
 G_BEGIN_DECLS
 
-#define META_TYPE_SHAPED_TEXTURE            (meta_shaped_texture_get_type())
-#define META_SHAPED_TEXTURE(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj),META_TYPE_SHAPED_TEXTURE, 
MetaShapedTexture))
-#define META_SHAPED_TEXTURE_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_SHAPED_TEXTURE, 
MetaShapedTextureClass))
-#define META_IS_SHAPED_TEXTURE(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_SHAPED_TEXTURE))
-#define META_IS_SHAPED_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_SHAPED_TEXTURE))
-#define META_SHAPED_TEXTURE_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_SHAPED_TEXTURE, 
MetaShapedTextureClass))
+#define META_TYPE_SHAPED_TEXTURE (meta_shaped_texture_get_type ())
+G_DECLARE_FINAL_TYPE (MetaShapedTexture,
+                      meta_shaped_texture,
+                      META, SHAPED_TEXTURE,
+                      ClutterActor)
 
-typedef struct _MetaShapedTexture        MetaShapedTexture;
-typedef struct _MetaShapedTextureClass   MetaShapedTextureClass;
-typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate;
 
-struct _MetaShapedTextureClass
-{
-  /*< private >*/
-  ClutterActorClass parent_class;
-};
-
-/**
- * MetaShapedTexture:
- *
- * The <structname>MetaShapedTexture</structname> structure contains
- * only private data and should be accessed using the provided API
- */
-struct _MetaShapedTexture
-{
-  /*< private >*/
-  ClutterActor parent;
-
-  MetaShapedTexturePrivate *priv;
-};
-
-GType meta_shaped_texture_get_type (void) G_GNUC_CONST;
-
-void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *stex,
+void meta_shaped_texture_set_create_mipmaps (MetaShapedTexture *self,
                                             gboolean           create_mipmaps);
 
-gboolean meta_shaped_texture_update_area (MetaShapedTexture *stex,
+gboolean meta_shaped_texture_update_area (MetaShapedTexture *self,
                                           int                x,
                                           int                y,
                                           int                width,
                                           int                height);
 
-CoglTexture * meta_shaped_texture_get_texture (MetaShapedTexture *stex);
+CoglTexture * meta_shaped_texture_get_texture (MetaShapedTexture *self);
 
-void meta_shaped_texture_set_mask_texture (MetaShapedTexture *stex,
+void meta_shaped_texture_set_mask_texture (MetaShapedTexture *self,
                                            CoglTexture       *mask_texture);
-void meta_shaped_texture_set_opaque_region (MetaShapedTexture *stex,
+void meta_shaped_texture_set_opaque_region (MetaShapedTexture *self,
                                             cairo_region_t    *opaque_region);
 
-cairo_surface_t * meta_shaped_texture_get_image (MetaShapedTexture     *stex,
+cairo_surface_t * meta_shaped_texture_get_image (MetaShapedTexture     *self,
                                                  cairo_rectangle_int_t *clip);
 
 G_END_DECLS
diff --git a/src/meta/meta-window-actor.h b/src/meta/meta-window-actor.h
index d5862e44b..c1bc02b68 100644
--- a/src/meta/meta-window-actor.h
+++ b/src/meta/meta-window-actor.h
@@ -28,34 +28,12 @@
 #include "clutter/clutter.h"
 #include "meta/compositor.h"
 
-/*
- * MetaWindowActor object (ClutterGroup sub-class)
- */
-#define META_TYPE_WINDOW_ACTOR            (meta_window_actor_get_type ())
-#define META_WINDOW_ACTOR(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), META_TYPE_WINDOW_ACTOR, 
MetaWindowActor))
-#define META_WINDOW_ACTOR_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), META_TYPE_WINDOW_ACTOR, 
MetaWindowActorClass))
-#define META_IS_WINDOW_ACTOR(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), META_TYPE_WINDOW_ACTOR))
-#define META_IS_WINDOW_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), META_TYPE_WINDOW_ACTOR))
-#define META_WINDOW_ACTOR_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), META_TYPE_WINDOW_ACTOR, 
MetaWindowActorClass))
-
-typedef struct _MetaWindowActor        MetaWindowActor;
-typedef struct _MetaWindowActorClass   MetaWindowActorClass;
-typedef struct _MetaWindowActorPrivate MetaWindowActorPrivate;
-
-struct _MetaWindowActorClass
-{
-  /*< private >*/
-  ClutterActorClass parent_class;
-};
-
-struct _MetaWindowActor
-{
-  ClutterActor           parent;
-
-  MetaWindowActorPrivate *priv;
-};
+#define META_TYPE_WINDOW_ACTOR (meta_window_actor_get_type ())
+G_DECLARE_FINAL_TYPE (MetaWindowActor,
+                      meta_window_actor,
+                      META, WINDOW_ACTOR,
+                      ClutterActor)
 
-GType meta_window_actor_get_type (void);
 
 Window             meta_window_actor_get_x_window         (MetaWindowActor *self);
 MetaWindow *       meta_window_actor_get_meta_window      (MetaWindowActor *self);
diff --git a/src/meta/meta-window-group.h b/src/meta/meta-window-group.h
index 624e07c9a..8dc219887 100644
--- a/src/meta/meta-window-group.h
+++ b/src/meta/meta-window-group.h
@@ -6,6 +6,9 @@
 #include "clutter/clutter.h"
 
 #define META_TYPE_WINDOW_GROUP (meta_window_group_get_type())
-G_DECLARE_FINAL_TYPE (MetaWindowGroup, meta_window_group, META, WINDOW_GROUP, ClutterActor)
+G_DECLARE_FINAL_TYPE (MetaWindowGroup,
+                      meta_window_group,
+                      META, WINDOW_GROUP,
+                      ClutterActor)
 
 #endif /* META_WINDOW_GROUP_H */
diff --git a/src/meta/meta-workspace-manager.h b/src/meta/meta-workspace-manager.h
index 52b2f0e30..da8125e49 100644
--- a/src/meta/meta-workspace-manager.h
+++ b/src/meta/meta-workspace-manager.h
@@ -30,7 +30,10 @@
 #include <meta/types.h>
 
 #define META_TYPE_WORKSPACE_MANAGER (meta_workspace_manager_get_type ())
-G_DECLARE_FINAL_TYPE (MetaWorkspaceManager, meta_workspace_manager, META, WORKSPACE_MANAGER, GObject)
+G_DECLARE_FINAL_TYPE (MetaWorkspaceManager,
+                      meta_workspace_manager,
+                      META, WORKSPACE_MANAGER,
+                      GObject)
 
 GList *meta_workspace_manager_get_workspaces (MetaWorkspaceManager *workspace_manager);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]