[fusion-commits] Compiz mirror: Changes to 'master' (15f317f11bd8fe1b43d7f96ea1ebefc8a21753d6)
compiz at server.opencompositing.org
compiz at server.opencompositing.org
Sat Mar 29 14:33:06 CET 2008
New commits:
commit 15f317f11bd8fe1b43d7f96ea1ebefc8a21753d6
Merge: cf5c766aecf634e8ab0629c1ba1c5ff24fd6d0a0 a1df59ca40c45437391a15e272841f9d5d83dd9a
Author: Danny Baumann <dannybaumann at web.de>
Date: Sat Mar 29 14:31:43 2008 +0100
Merge branch 'master' of git+ssh://maniac@git.freedesktop.org/git/xorg/app/compiz
commit cf5c766aecf634e8ab0629c1ba1c5ff24fd6d0a0
Author: Danny Baumann <dannybaumann at web.de>
Date: Sat Mar 29 14:30:01 2008 +0100
Avoid unnecessarily unloading plugins if the new plugin list does not contain the core plugin.
src/display.c | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
Modified: compiz/src/display.c
===================================================================
--- compiz/src/display.c
+++ compiz/src/display.c
@@ -925,17 +925,23 @@ updatePlugins (CompDisplay *d)
d->dirtyPluginList = FALSE;
o = &d->opt[COMP_DISPLAY_OPTION_ACTIVE_PLUGINS];
- for (i = 0; i < d->plugin.list.nValue && i < o->value.list.nValue; i++)
+
+ /* The old plugin list always begins with the core plugin. To make sure
+ we don't unnecessarily unload plugins if the new plugin list does not
+ contain the core plugin, we have to use an offset */
+ if (o->value.list.nValue > 0 && strcmp (o->value.list.value[0].s, "core"))
+ i = 0;
+ else
+ i = 1;
+
+ /* j is initialized to 1 to make sure we never pop the core plugin */
+ for (j = 1; j < d->plugin.list.nValue && i < o->value.list.nValue; i++, j++)
{
- if (strcmp (d->plugin.list.value[i].s, o->value.list.value[i].s))
+ if (strcmp (d->plugin.list.value[j].s, o->value.list.value[i].s))
break;
}
- /* never pop the core plugin */
- if (i)
- nPop = d->plugin.list.nValue - i;
- else
- nPop = d->plugin.list.nValue - 1;
+ nPop = d->plugin.list.nValue - j;
if (nPop)
{
More information about the commits
mailing list