rpms/compiz/devel compiz-0.8.2-pin-initial-plugins.patch, 1.1, 1.2 compiz.spec, 1.168, 1.169

drago01 drago01 at fedoraproject.org
Fri Jul 10 11:57:02 UTC 2009


Author: drago01

Update of /cvs/pkgs/rpms/compiz/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4521

Modified Files:
	compiz-0.8.2-pin-initial-plugins.patch compiz.spec 
Log Message:
fix bug 473896

compiz-0.8.2-pin-initial-plugins.patch:

Index: compiz-0.8.2-pin-initial-plugins.patch
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/devel/compiz-0.8.2-pin-initial-plugins.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- compiz-0.8.2-pin-initial-plugins.patch	25 May 2009 19:46:42 -0000	1.1
+++ compiz-0.8.2-pin-initial-plugins.patch	10 Jul 2009 11:57:02 -0000	1.2
@@ -1,6 +1,6 @@
 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
++++ compiz-0.8.2/include/compiz-core.h	2009-07-10 13:53:53.353467924 +0200
 @@ -220,6 +220,9 @@ extern Bool       noDetection;
  extern Bool	  useDesktopHints;
  extern Bool       onlyCurrentScreen;
@@ -13,50 +13,123 @@ diff -upNr compiz-0.8.2.orign/include/co
  
 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)
++++ compiz-0.8.2/src/display.c	2009-07-10 13:53:53.354468151 +0200
+@@ -675,24 +675,59 @@ updatePlugins (CompDisplay *d)
  {
      CompOption *o;
      CompPlugin *p, **pop = 0;
 -    int	       nPop, i, j;
-+    int	       nPop, i, j, k;
++    int	       nPop, i, j, k, dupPluginCount;
++    CompOptionValue *pList;
++    int pList_count;
  
      d->dirtyPluginList = FALSE;
  
-@@ -715,6 +715,30 @@ updatePlugins (CompDisplay *d)
- 	free (d->plugin.list.value[d->plugin.list.nValue].s);
-     }
+     o = &d->opt[COMP_DISPLAY_OPTION_ACTIVE_PLUGINS];
  
-+    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;
+-    /* 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;
++    /* Make sure the new plugin list always list core first, then the
++       initial plugins... */
++    dupPluginCount = 0;
++    for (i=0; i < o->value.list.nValue; ++i)  {
++	if (strcmp(o->value.list.value[i].s, "core") == 0)
++	    ++dupPluginCount;
++	else
++	    for (j=0; j < nInitialPlugins; ++j)
++		if (strcmp(o->value.list.value[i].s, initialPlugins[j]) == 0) {
++		    ++dupPluginCount;
++		    break;
 +		}
-+	    }
-+	}
 +    }
 +
++    pList_count = 1+nInitialPlugins+o->value.list.nValue-dupPluginCount;
 +
-     for (; i < o->value.list.nValue; i++)
++    pList = malloc(sizeof(CompOptionValue) * pList_count);
++    if (!pList) {
++	(*core.setOptionForPlugin) (&d->base, "core", o->name, &d->plugin);
++	return;
++    }
++
++    pList[0].s = "core";
++    for (j=0; j < nInitialPlugins; ++j)
++	pList[j+1].s = initialPlugins[j];
++    ++j;
++
++    for (i=0; i < o->value.list.nValue; ++i)  {
++	if (strcmp(o->value.list.value[i].s, "core") == 0)
++	    goto L_nextPlugin;
++	else
++	    for (k=0; k < nInitialPlugins; ++k)
++		if (strcmp(o->value.list.value[i].s, initialPlugins[k]) == 0) 
++		    goto L_nextPlugin;
++	pList[j++].s = o->value.list.value[i].s;
++    L_nextPlugin:
++	(void)0;
++    }
++
++    assert(j == pList_count);
+ 
+     /* 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++)
++    for (i = j = 1; j < d->plugin.list.nValue && i < pList_count; i++, j++)
+     {
+-	if (strcmp (d->plugin.list.value[j].s, o->value.list.value[i].s))
++	if (strcmp (d->plugin.list.value[j].s, pList[i].s))
+ 	    break;
+     }
+ 
+@@ -704,6 +739,7 @@ updatePlugins (CompDisplay *d)
+ 	if (!pop)
+ 	{
+ 	    (*core.setOptionForPlugin) (&d->base, "core", o->name, &d->plugin);
++	    free(pList);
+ 	    return;
+ 	}
+     }
+@@ -715,13 +751,13 @@ updatePlugins (CompDisplay *d)
+ 	free (d->plugin.list.value[d->plugin.list.nValue].s);
+     }
+ 
+-    for (; i < o->value.list.nValue; i++)
++    for (; i < pList_count; i++)
      {
  	p = 0;
+ 	for (j = 0; j < nPop; j++)
+ 	{
+ 	    if (pop[j] && strcmp (pop[j]->vTable->name,
+-				  o->value.list.value[i].s) == 0)
++				  pList[i].s) == 0)
+ 	    {
+ 		if (pushPlugin (pop[j]))
+ 		{
+@@ -734,7 +770,7 @@ updatePlugins (CompDisplay *d)
+ 
+ 	if (p == 0)
+ 	{
+-	    p = loadPlugin (o->value.list.value[i].s);
++	    p = loadPlugin (pList[i].s);
+ 	    if (p)
+ 	    {
+ 		if (!pushPlugin (p))
+@@ -775,7 +811,9 @@ updatePlugins (CompDisplay *d)
+     if (nPop)
+ 	free (pop);
+ 
++    free(pList);
+     (*core.setOptionForPlugin) (&d->base, "core", o->name, &d->plugin);
++
+ }
+ 
+ static void
 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
++++ compiz-0.8.2/src/main.c	2009-07-10 13:53:53.354468151 +0200
 @@ -40,6 +40,9 @@ char *programName;
  char **programArgv;
  int  programArgc;


Index: compiz.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/devel/compiz.spec,v
retrieving revision 1.168
retrieving revision 1.169
diff -u -p -r1.168 -r1.169
--- compiz.spec	9 Jun 2009 03:10:58 -0000	1.168
+++ compiz.spec	10 Jul 2009 11:57:02 -0000	1.169
@@ -14,7 +14,7 @@ URL:            http://www.go-compiz.org
 License:        GPLv2+ and LGPLv2+ and MIT
 Group:          User Interface/Desktops
 Version:        0.8.2
-Release:        3%{?dist}
+Release:        4%{?dist}
 
 Summary:        OpenGL window and compositing manager
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -356,6 +356,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jul 10 2009 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.2-4
+- Replace compiz-0.8.2-pin-initial-plugins with a fixed up one
+  by Philippe Troin <phil at fifi.org> (RH #473896)
+
 * Mon Jun  8 2009 Matthias Clasen <mclasen at redhat.com> - 0.8.2-3
 - Fix handling of --replace in compiz-gtk, _again_
 




More information about the fedora-extras-commits mailing list