summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Riedi <andrewriedi@gmail.com>2007-06-07 16:44:45 -0700
committerAndrew Riedi <andrewriedi@gmail.com>2007-06-07 16:44:45 -0700
commitf55c02721db07b076101151e63854f4b2ded433c (patch)
tree7e677d039b2187459f21fb5d36240aa1e6684578
parent96e9cf2b650aae80fd4c2d1f9cd5c2978d4aa8f8 (diff)
downloadworkarounds-f55c02721db07b076101151e63854f4b2ded433c.tar.gz
workarounds-f55c02721db07b076101151e63854f4b2ded433c.tar.bz2
Add 'workaroundsMetadata' and 'displayPrivateIndex.'
-rw-r--r--workarounds.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/workarounds.c b/workarounds.c
index eda7cf4..bece602 100644
--- a/workarounds.c
+++ b/workarounds.c
@@ -20,13 +20,31 @@
#include <compiz.h>
+static CompMetadata workaroundsMetadata;
+static int displayPrivateIndex;
+
static Bool workaroundsInit( CompPlugin *plugin )
{
+ if ( !compInitPluginMetadataFromInfo( &workaroundsMetadata,
+ plugin->vTable->name, 0, 0, 0, 0 ) )
+ return FALSE;
+
+ displayPrivateIndex = allocateDisplayPrivateIndex ();
+ if ( displayPrivateIndex < 0 )
+ {
+ compFiniMetadata( &workaroundsMetadata );
+ return FALSE;
+ }
+
+ compAddMetadataFromFile( &workaroundsMetadata, plugin->vTable->name );
+
return TRUE;
}
static void workaroundsFini( CompPlugin *plugin )
{
+ freeDisplayPrivateIndex( displayPrivateIndex );
+ compFiniMetadata( &workaroundsMetadata );
}
static int workaroundsGetVersion( CompPlugin *plugin, int version )
@@ -34,11 +52,16 @@ static int workaroundsGetVersion( CompPlugin *plugin, int version )
return ABIVERSION;
}
+static CompMetadata *workaroundsGetMetadata( CompPlugin *plugin )
+{
+ return &workaroundsMetadata;
+}
+
CompPluginVTable workaroundsVTable =
{
"workarounds",
workaroundsGetVersion,
- 0, /* GetMetadata */
+ workaroundsGetMetadata,
workaroundsInit,
workaroundsFini,
0, /* InitDisplay */