compiz/compiz-0.8.2-pin-initial-plugins.patch
2009-05-25 19:46:42 +00:00

92 lines
2.3 KiB
Diff

diff -upNr compiz-0.8.2.orign/include/compiz-core.h compiz-0.8.2/include/compiz-core.h
--- compiz-0.8.2.orign/include/compiz-core.h 2009-02-15 10:10:23.000000000 +0100
+++ compiz-0.8.2/include/compiz-core.h 2009-05-25 21:15:24.502138356 +0200
@@ -220,6 +220,9 @@ extern Bool noDetection;
extern Bool useDesktopHints;
extern Bool onlyCurrentScreen;
+extern char **initialPlugins;
+extern int nInitialPlugins;
+
extern int defaultRefreshRate;
extern char *defaultTextureFilter;
diff -upNr compiz-0.8.2.orign/src/display.c compiz-0.8.2/src/display.c
--- compiz-0.8.2.orign/src/display.c 2009-02-15 10:10:23.000000000 +0100
+++ compiz-0.8.2/src/display.c 2009-05-25 21:15:24.503089882 +0200
@@ -675,7 +675,7 @@ updatePlugins (CompDisplay *d)
{
CompOption *o;
CompPlugin *p, **pop = 0;
- int nPop, i, j;
+ int nPop, i, j, k;
d->dirtyPluginList = FALSE;
@@ -715,6 +715,30 @@ updatePlugins (CompDisplay *d)
free (d->plugin.list.value[d->plugin.list.nValue].s);
}
+ for ( k = 0; k < nInitialPlugins; k++)
+ {
+ for ( j = 0; j < nPop; j++)
+ {
+ if (pop[j] && strcmp (pop[j]->vTable->name,
+ initialPlugins[k]) == 0)
+ break;
+ }
+
+ if ( j == (nPop - 1))
+ {
+ p = loadPlugin (initialPlugins[k]);
+ if (p)
+ {
+ if (!pushPlugin (p))
+ {
+ unloadPlugin (p);
+ p = 0;
+ }
+ }
+ }
+ }
+
+
for (; i < o->value.list.nValue; i++)
{
p = 0;
diff -upNr compiz-0.8.2.orign/src/main.c compiz-0.8.2/src/main.c
--- compiz-0.8.2.orign/src/main.c 2009-02-16 14:57:22.000000000 +0100
+++ compiz-0.8.2/src/main.c 2009-05-25 21:15:24.503089882 +0200
@@ -40,6 +40,9 @@ char *programName;
char **programArgv;
int programArgc;
+char **initialPlugins = NULL;
+int nInitialPlugins = 0;
+
char *backgroundImage = NULL;
REGION emptyRegion;
@@ -413,6 +416,11 @@ main (int argc, char **argv)
ptr += sprintf (ptr, "</default>");
}
+
+ initialPlugins = malloc (nPlugin * sizeof (char *));
+ memcpy (initialPlugins, plugin, nPlugin * sizeof (char *));
+ nInitialPlugins = nPlugin;
+
}
xmlInitParser ();
@@ -462,6 +470,9 @@ main (int argc, char **argv)
xmlCleanupParser ();
+ if (initialPlugins != NULL)
+ free (initialPlugins);
+
if (restartSignal)
{
execvp (programName, programArgv);