Make MetaShapedTexture a subclass of ClutterGLXTexturePixmap and use

it for window actors.
This commit is contained in:
Neil Roberts 2008-09-24 21:48:02 +01:00
parent 0bbe8b8004
commit 19d338cb50
3 changed files with 7 additions and 4 deletions

View File

@ -19,6 +19,7 @@
#include "compositor-clutter.h"
#include "compositor-clutter-plugin-manager.h"
#include "xprops.h"
#include "shaped-texture.h"
#include <X11/Xatom.h>
#include <X11/Xlibint.h>
#include <X11/extensions/shape.h>
@ -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);
}

View File

@ -24,6 +24,7 @@
*/
#include <clutter/clutter-texture.h>
#include <clutter/glx/clutter-glx.h>
#include <cogl/cogl.h>
#include <string.h>
@ -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, \

View File

@ -27,6 +27,7 @@
#define __META_SHAPED_TEXTURE_H__
#include <clutter/clutter-texture.h>
#include <clutter/glx/clutter-glx.h>
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;
};