rpms/compiz/devel compiz-0.7.8-decoration-placement.patch, NONE, 1.1 compiz-0.7.8-fullscreen-top.patch, NONE, 1.1 compiz-0.7.8-pin-initial-plugins.patch, NONE, 1.1 .cvsignore, 1.39, 1.40 compiz-gtk, 1.1, 1.2 compiz.spec, 1.145, 1.146 sources, 1.42, 1.43

Adel Gadllah drago01 at fedoraproject.org
Thu Dec 4 21:00:25 UTC 2008


Author: drago01

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

Modified Files:
	.cvsignore compiz-gtk compiz.spec sources 
Added Files:
	compiz-0.7.8-decoration-placement.patch 
	compiz-0.7.8-fullscreen-top.patch 
	compiz-0.7.8-pin-initial-plugins.patch 
Log Message:
bugfixes

compiz-0.7.8-decoration-placement.patch:

--- NEW FILE compiz-0.7.8-decoration-placement.patch ---
diff --git a/plugins/place.c b/plugins/place.c
index 596a3a5..fe4c39e 100644
--- a/plugins/place.c
+++ b/plugins/place.c
@@ -1085,21 +1085,35 @@ placeConstrainToWorkarea (CompWindow *w,
 			  int        *y)
 {
     CompWindowExtents extents;
+    int               width, height;
 
     extents.left   = *x - w->input.left;
     extents.top    = *y - w->input.top;
     extents.right  = *x + w->serverWidth + w->input.right;
     extents.bottom = *y + w->serverHeight + w->input.bottom;
 
+    width  = extents.right - extents.left;
+    height = extents.bottom - extents.top;
+
     if (extents.left < workArea->x)
+    {
 	*x += workArea->x - extents.left;
-    else if (extents.right > workArea->x + workArea->width)
+    }
+    else if (width <= workArea->width &&
+	     extents.right > workArea->x + workArea->width)
+    {
 	*x += workArea->x + workArea->width - extents.right;
+    }
 
     if (extents.top < workArea->y)
+    {
 	*y += workArea->y - extents.top;
-    else if (extents.bottom > workArea->y + workArea->height)
+    }
+    else if (height <= workArea->height &&
+	     extents.bottom > workArea->y + workArea->height)
+    {
 	*y += workArea->y + workArea->height - extents.bottom;
+    }
 }
 
 static Bool


compiz-0.7.8-fullscreen-top.patch:

--- NEW FILE compiz-0.7.8-fullscreen-top.patch ---
diff --git a/src/window.c b/src/window.c
index 9d80340..0a217d2 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3142,7 +3142,8 @@ avoidStackingRelativeTo (CompWindow *w)
 
 /* goes through the stack, top-down until we find a window we should
    stack above, normal windows can be stacked above fullscreen windows
-   if aboveFs is TRUE. */
+   (and fullscreen windows over others in their layer) if aboveFs
+   is TRUE. */
 static CompWindow *
 findSiblingBelow (CompWindow *w,
 		  Bool	     aboveFs)
@@ -3179,6 +3180,9 @@ findSiblingBelow (CompWindow *w,
 	    /* desktop window layer */
 	    break;
 	case CompWindowTypeFullscreenMask:
+	    if (aboveFs)
+		return below;
+	    /* otherwise fall-through */
 	case CompWindowTypeDockMask:
 	    /* fullscreen and dock layer */
 	    if (below->type & (CompWindowTypeFullscreenMask |
@@ -4080,8 +4084,15 @@ raiseWindow (CompWindow *w)
 {
     XWindowChanges xwc;
     int		   mask;
+    Bool           aboveFs = FALSE;
+
+    /* an active fullscreen window should be raised over all other
+       windows in its layer */
+    if (w->type & CompWindowTypeFullscreenMask)
+	if (w->id == w->screen->display->activeWindow)
+	    aboveFs = TRUE;
 
-    mask = addWindowStackChanges (w, &xwc, findSiblingBelow (w, FALSE));
+    mask = addWindowStackChanges (w, &xwc, findSiblingBelow (w, aboveFs));
     if (mask)
 	configureXWindow (w, mask, &xwc);
 }
@@ -4194,6 +4205,17 @@ updateWindowAttributes (CompWindow             *w,
 	CompWindow *sibling;
 
 	aboveFs = (stackingMode == CompStackingUpdateModeAboveFullscreen);
+	if (w->type & CompWindowTypeFullscreenMask)
+	{
+	    /* put active or soon-to-be-active fullscreen windows over
+	       all others in their layer */
+	    if (w->id == w->screen->display->activeWindow ||
+		stackingMode == CompStackingUpdateModeInitialMap)
+	    {
+		aboveFs = TRUE;
+	    }
+	}
+
 	sibling = findSiblingBelow (w, aboveFs);
 
 	if (sibling &&


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

--- NEW FILE compiz-0.7.8-pin-initial-plugins.patch ---
diff --git a/include/compiz-core.h b/include/compiz-core.h
index 5aeb04c..97279ab 100644
--- a/include/compiz-core.h
+++ b/include/compiz-core.h
@@ -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 --git a/src/display.c b/src/display.c
index dd4676e..fc3e117 100644
--- a/src/display.c
+++ b/src/display.c
@@ -846,7 +846,7 @@ updatePlugins (CompDisplay *d)
 {
     CompOption *o;
     CompPlugin *p, **pop = 0;
-    int	       nPop, i, j;
+    int	       nPop, i, j, k;
 
     d->dirtyPluginList = FALSE;
 
@@ -886,6 +886,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 --git a/src/main.c b/src/main.c
index 3784afe..ff982fe 100644
--- a/src/main.c
+++ b/src/main.c
@@ -40,6 +40,9 @@ char *programName;
 char **programArgv;
 int  programArgc;
 
+char **initialPlugins = NULL;
+int nInitialPlugins = 0;
+
 char *backgroundImage = NULL;
 
 REGION   emptyRegion;
@@ -406,6 +409,11 @@ main (int argc, char **argv)
 
 	    ptr += sprintf (ptr, "</default>");
 	}
+
+	initialPlugins = malloc (nPlugin * sizeof (char *));
+	memcpy (initialPlugins, plugin, nPlugin * sizeof (char *));
+	nInitialPlugins = nPlugin;
+
     }
 
     xmlInitParser ();
@@ -455,6 +463,9 @@ main (int argc, char **argv)
 
     xmlCleanupParser ();
 
+    if (initialPlugins != NULL)
+        free (initialPlugins);
+
     if (restartSignal)
     {
 	execvp (programName, programArgv);


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/devel/.cvsignore,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- .cvsignore	8 Nov 2008 11:13:10 -0000	1.39
+++ .cvsignore	4 Dec 2008 20:59:54 -0000	1.40
@@ -1 +1,2 @@
 compiz-0.7.8.tar.bz2
+glx_tfp_test.c


Index: compiz-gtk
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/devel/compiz-gtk,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- compiz-gtk	25 Sep 2008 23:14:01 -0000	1.1
+++ compiz-gtk	4 Dec 2008 20:59:54 -0000	1.2
@@ -1,5 +1,11 @@
 #!/bin/sh
-
 export LIBGL_ALWAYS_INDIRECT=1
-gtk-window-decorator &
-exec compiz --ignore-desktop-hints glib gconf $@
+
+/usr/bin/glx_tfp_test
+
+if [ $? -eq 0 ]; then
+	gtk-window-decorator &
+	exec compiz glib gconf $@
+else
+	exec metacity $@
+fi


Index: compiz.spec
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/devel/compiz.spec,v
retrieving revision 1.145
retrieving revision 1.146
diff -u -r1.145 -r1.146
--- compiz.spec	1 Dec 2008 18:16:38 -0000	1.145
+++ compiz.spec	4 Dec 2008 20:59:54 -0000	1.146
@@ -14,7 +14,7 @@
 License:        GPLv2+ and LGPLv2+ and MIT
 Group:          User Interface/Desktops
 Version:        0.7.8
-Release:        5%{?dist}
+Release:        6%{?dist}
 
 Summary:        OpenGL window and compositing manager
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -48,6 +48,7 @@
 Source2:	kde-desktop-effects-%{kde_dialogversion}.tar.bz2
 Source3:        compiz-gtk
 Source4:        compiz-gtk.desktop
+Source5:	glx_tfp_test.c
 
 # Make sure that former beryl users still have bling
 Obsoletes: beryl-core
@@ -64,6 +65,13 @@
 # make kde4-window-decorator build against KDE 4.2's libplasma
 Patch120: compiz-0.7.8-kde42.patch
 
+# backports from git
+Patch121: compiz-0.7.8-decoration-placement.patch
+Patch122: compiz-0.7.8-fullscreen-top.patch
+
+# Make sure configuration plugins never get unloaded
+Patch123: compiz-0.7.8-pin-initial-plugins.patch
+
 %description
 Compiz is one of the first OpenGL-accelerated compositing window
 managers for the X Window System. The integration allows it to perform
@@ -141,6 +149,10 @@
 sleep 1
 touch configure
 
+%patch121 -p1 -b .decoration-placement
+%patch122 -p1 -b .fullscreen-top
+%patch123 -p1 -b .initial-plugins
+
 %build
 rm -rf $RPM_BUILD_ROOT
 
@@ -167,6 +179,9 @@
 
 make %{?_smp_mflags} imagedir=%{_datadir}/pixmaps
 
+# glx_tfp_test
+gcc %{SOURCE5} -lX11 -lGLU $RPM_OPT_FLAGS -o glx_tfp_test
+
 # desktop-effects
 cd ../desktop-effects-%{dialogversion}
 %configure
@@ -188,6 +203,7 @@
 popd
 
 install %SOURCE3 $RPM_BUILD_ROOT%{_bindir}
+install glx_tfp_test $RPM_BUILD_ROOT%{_bindir}
 
 desktop-file-install --vendor="" \
   --dir $RPM_BUILD_ROOT%{_datadir}/applications \
@@ -311,6 +327,7 @@
 %files gnome -f gnome-files.txt
 %defattr(-, root, root)
 %{_bindir}/compiz-gtk
+%{_bindir}/glx_tfp_test
 %{_bindir}/gtk-window-decorator
 %{_bindir}/desktop-effects
 %{_libdir}/window-manager-settings/libcompiz.so
@@ -351,6 +368,14 @@
 
 
 %changelog
+* Thu Dec 04 2008 Adel Gadllah <adel.gadllah at gmail.com> - 0.7.8-6
+- Bugfixes from git head:
+	compiz-0.7.8-decoration-placement.patch (RH #218561)
+	compiz-0.7.8-fullscreen-top.patch
+- Fall back to metacity if GLX_tfp is not present (RH #457816)
+- Don't allow command line passed (config) plugins to be unloaded
+- Don't use --ignore-desktop-hints (upstream default now)
+
 * Mon Dec 01 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 0.7.8-5
 - Patch and rebuild for new libplasma, BR plasma-devel
 


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/compiz/devel/sources,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- sources	8 Nov 2008 12:10:48 -0000	1.42
+++ sources	4 Dec 2008 20:59:54 -0000	1.43
@@ -1,3 +1,4 @@
 cb8baed2983dec5184f196346f973ad2  compiz-0.7.8.tar.bz2
 d56f2f6456fc89b06e1e0d21cab74f55  desktop-effects-0.7.18.tar.bz2
 7a7766f43797239ca0a4a0881d91f646  kde-desktop-effects-0.0.5.tar.bz2
+f7e0c4d917659d67a957bf391b525495  glx_tfp_test.c




More information about the fedora-extras-commits mailing list