From 19d338cb506bf53141212eccadbe882ae0a9a78e Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 24 Sep 2008 21:48:02 +0100 Subject: [PATCH] Make MetaShapedTexture a subclass of ClutterGLXTexturePixmap and use it for window actors. --- src/compositor/compositor-clutter.c | 3 ++- src/compositor/shaped-texture.c | 3 ++- src/compositor/shaped-texture.h | 5 +++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/compositor/compositor-clutter.c b/src/compositor/compositor-clutter.c index cc008fa76..d6d6a6ef3 100644 --- a/src/compositor/compositor-clutter.c +++ b/src/compositor/compositor-clutter.c @@ -19,6 +19,7 @@ #include "compositor-clutter.h" #include "compositor-clutter-plugin-manager.h" #include "xprops.h" +#include "shaped-texture.h" #include #include #include @@ -347,7 +348,7 @@ meta_comp_window_constructed (GObject *object) clutter_container_add_actor (CLUTTER_CONTAINER (self), priv->shadow); } - priv->actor = clutter_glx_texture_pixmap_new (); + priv->actor = meta_shaped_texture_new (); clutter_container_add_actor (CLUTTER_CONTAINER (self), priv->actor); } diff --git a/src/compositor/shaped-texture.c b/src/compositor/shaped-texture.c index f76c5ca4e..18c405d38 100644 --- a/src/compositor/shaped-texture.c +++ b/src/compositor/shaped-texture.c @@ -24,6 +24,7 @@ */ #include +#include #include #include @@ -39,7 +40,7 @@ static void meta_shaped_texture_pick (ClutterActor *actor, static void meta_shaped_texture_dirty_mask (MetaShapedTexture *stex); G_DEFINE_TYPE (MetaShapedTexture, meta_shaped_texture, - CLUTTER_TYPE_TEXTURE); + CLUTTER_GLX_TYPE_TEXTURE_PIXMAP); #define META_SHAPED_TEXTURE_GET_PRIVATE(obj) \ (G_TYPE_INSTANCE_GET_PRIVATE ((obj), META_TYPE_SHAPED_TEXTURE, \ diff --git a/src/compositor/shaped-texture.h b/src/compositor/shaped-texture.h index 0b92b5696..9f883b495 100644 --- a/src/compositor/shaped-texture.h +++ b/src/compositor/shaped-texture.h @@ -27,6 +27,7 @@ #define __META_SHAPED_TEXTURE_H__ #include +#include G_BEGIN_DECLS @@ -57,12 +58,12 @@ typedef struct _MetaShapedTexturePrivate MetaShapedTexturePrivate; struct _MetaShapedTextureClass { - ClutterTextureClass parent_class; + ClutterGLXTexturePixmapClass parent_class; }; struct _MetaShapedTexture { - ClutterTexture parent; + ClutterGLXTexturePixmap parent; MetaShapedTexturePrivate *priv; };