[compiz] Some upstream fixes from git

drago01 drago01 at fedoraproject.org
Fri Jul 30 16:12:30 UTC 2010


commit 462792cdb08ca8b44798c2db6ccc950d32f023ab
Author: Adel Gadllah <adel.gadllah at gmail.com>
Date:   Fri Jul 30 18:08:45 2010 +0200

    Some upstream fixes from git
    
    Backport some minior fixes from upstream:
    
    1bed3dbcea6473f84745ec7a1f936c4f5d3b3a01
    a86c461684f122fd286884c4ff28f6ea673fe669
    984bca5801d6179b9f8081c4b6c466063975d940

 compiz-0.8.6-focus-denied-stacking-fix.patch |   45 ++++++++++++++++++++++++++
 compiz-0.8.6-icon-size.patch                 |   42 ++++++++++++++++++++++++
 compiz-0.8.6-map-gravity-fix.patch           |   44 +++++++++++++++++++++++++
 compiz.spec                                  |   12 ++++++-
 4 files changed, 142 insertions(+), 1 deletions(-)
---
diff --git a/compiz-0.8.6-focus-denied-stacking-fix.patch b/compiz-0.8.6-focus-denied-stacking-fix.patch
new file mode 100644
index 0000000..e2e4bb2
--- /dev/null
+++ b/compiz-0.8.6-focus-denied-stacking-fix.patch
@@ -0,0 +1,45 @@
+From 984bca5801d6179b9f8081c4b6c466063975d940 Mon Sep 17 00:00:00 2001
+From: Owen W. Taylor <otaylor at fishsoup.net>
+Date: Tue, 22 Jun 2010 23:29:17 +0000
+Subject: Don't stack focus-denied windows in a disallowed position
+
+When a window is focus-stealing-prevented, we should only stack
+it below the active window if that is possible. If it's not
+(the window has the "Above" state, for example), then we should
+stack it at the normal location.
+
+http://bugs.opencompositing.org/show_bug.cgi?id=1304
+---
+diff --git a/src/window.c b/src/window.c
+index 60b47b9..0cfeee9 100644
+--- a/src/window.c
++++ b/src/window.c
+@@ -4447,14 +4447,19 @@ updateWindowAttributes (CompWindow             *w,
+ 		if (p->id == w->screen->display->activeWindow)
+ 		    break;
+ 
+-	    /* window is above active window so we should lower it */
+-	    if (p)
++	    /* window is above active window so we should lower it, assuming
++	     * that is allowed (if, for example, our window has the "above" state,
++	     * then lowering beneath the active window may not be allowed.)
++	     */
++	    if (p && validSiblingBelow (p, w))
++	    {
+ 		p = findValidStackSiblingBelow (sibling, p);
+ 
+-	    /* if we found a valid sibling under the active window, it's
+-	       our new sibling we want to stack above */
+-	    if (p)
+-		sibling = p;
++		/* if we found a valid sibling under the active window, it's
++		   our new sibling we want to stack above */
++		if (p)
++		  sibling = p;
++	    }
+ 	}
+ 
+ 	mask |= addWindowStackChanges (w, &xwc, sibling);
+--
+cgit v0.8.3.1-30-gff3a
+
diff --git a/compiz-0.8.6-icon-size.patch b/compiz-0.8.6-icon-size.patch
new file mode 100644
index 0000000..5d964eb
--- /dev/null
+++ b/compiz-0.8.6-icon-size.patch
@@ -0,0 +1,42 @@
+From 1bed3dbcea6473f84745ec7a1f936c4f5d3b3a01 Mon Sep 17 00:00:00 2001
+From: Danny Baumann <dannybaumann at web.de>
+Date: Sat, 03 Apr 2010 12:14:19 +0000
+Subject: Correctly handle weird icon sizes.
+
+iw * ih may overflow the value range of unsigned long if iw and ih are
+large enough, so check the single values as well.
+---
+diff --git a/src/window.c b/src/window.c
+index 24300fe..bd5aae8 100644
+--- a/src/window.c
++++ b/src/window.c
+@@ -5361,18 +5361,22 @@ getWindowIcon (CompWindow *w,
+ 
+ 	if (result == Success && data)
+ 	{
+-	    CARD32   *p;
+-	    CARD32   alpha, red, green, blue;
+-	    int      iw, ih, j;
++	    CARD32        *p;
++	    CARD32        alpha, red, green, blue;
++	    unsigned long iw, ih;
+ 
+ 	    for (i = 0; i + 2 < n; i += iw * ih + 2)
+ 	    {
+ 		unsigned long *idata = (unsigned long *) data;
++		unsigned long j;
+ 
+ 		iw  = idata[i];
+ 		ih = idata[i + 1];
+ 
+-		if (iw * ih + 2 > n - i)
++		/* iw * ih may be larger than the value range of unsigned
++		   long, so better do some checking for extremely weird
++		   icon sizes first */
++		if (iw > 2048 || ih > 2048 || iw * ih + 2 > n - i)
+ 		    break;
+ 
+ 		if (iw && ih)
+--
+cgit v0.8.3.1-30-gff3a
+
diff --git a/compiz-0.8.6-map-gravity-fix.patch b/compiz-0.8.6-map-gravity-fix.patch
new file mode 100644
index 0000000..58df98d
--- /dev/null
+++ b/compiz-0.8.6-map-gravity-fix.patch
@@ -0,0 +1,44 @@
+From a86c461684f122fd286884c4ff28f6ea673fe669 Mon Sep 17 00:00:00 2001
+From: Danny Baumann <dannybaumann at web.de>
+Date: Tue, 15 Jun 2010 05:47:05 +0000
+Subject: Only reflect the decoration size in MapRequest gravity adjustment, not
+
+the whole window size.
+---
+diff --git a/src/event.c b/src/event.c
+index 8600b5b..febb22d 100644
+--- a/src/event.c
++++ b/src/event.c
+@@ -2042,11 +2042,11 @@ handleEvent (CompDisplay *d,
+ 		    XWindowChanges xwc;
+ 		    unsigned int   xwcm, source;
+ 
+-		    /* adjust for gravity */
++		    /* adjust for gravity, but only for frame size */
+ 		    xwc.x      = w->serverX;
+ 		    xwc.y      = w->serverY;
+-		    xwc.width  = w->serverWidth;
+-		    xwc.height = w->serverHeight;
++		    xwc.width  = 0;
++		    xwc.height = 0;
+ 
+ 		    xwcm = adjustConfigureRequestForGravity (w, &xwc,
+ 							     CWX | CWY,
+diff --git a/src/window.c b/src/window.c
+index 9974df2..60b47b9 100644
+--- a/src/window.c
++++ b/src/window.c
+@@ -2568,8 +2568,8 @@ unmapWindow (CompWindow *w)
+ 	/* revert gravity adjustment made at MapRequest time */
+ 	xwc.x      = w->serverX;
+ 	xwc.y      = w->serverY;
+-	xwc.width  = w->serverWidth;
+-	xwc.height = w->serverHeight;
++	xwc.width  = 0;
++	xwc.height = 0;
+ 
+ 	xwcm = adjustConfigureRequestForGravity (w, &xwc,
+ 						 CWX | CWY,
+--
+cgit v0.8.3.1-30-gff3a
+
diff --git a/compiz.spec b/compiz.spec
index 6781495..a419782 100644
--- a/compiz.spec
+++ b/compiz.spec
@@ -13,7 +13,7 @@ URL:            http://www.go-compiz.org
 License:        GPLv2+ and LGPLv2+ and MIT
 Group:          User Interface/Desktops
 Version:        0.8.6
-Release:        2%{?dist}
+Release:        3%{?dist}
 
 Summary:        OpenGL window and compositing manager
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -58,6 +58,10 @@ Patch107: compiz-0.8.6-wall.patch
 #Patch110: scale-key.patch
 Patch111: compiz-0.8.6-unloadpluginfix.patch
 Patch112: no-more-gnome-wm-settings.patch
+# Some selected post 0.8.6 upstream backports
+Patch113: compiz-0.8.6-map-gravity-fix.patch
+Patch114: compiz-0.8.6-map-gravity-fix.patch
+Patch115: compiz-0.8.6-focus-denied-stacking-fix.patch
 
 %description
 Compiz is one of the first OpenGL-accelerated compositing window
@@ -125,6 +129,9 @@ and other kde integration related stuff.
 #%patch110 -p1 -b .scale-key
 %patch111 -p1 -b .unloadfix
 %patch112 -p1 -b .gnome-wm-settings
+%patch113 -p1 -b .icon-size
+%patch114 -p1 -b .map-request
+%patch115 -p1 -b .focus-denied-stacking
 
 %build
 rm -rf $RPM_BUILD_ROOT
@@ -301,6 +308,9 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jul 30 2010 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.6-3
+- Some backports from upstream
+
 * Thu Jul 15 2010 Adel Gadllah <adel.gadllah at gmail.com> - 0.8.6-2
 - gnome-window-manager-settings is no more ...
 


More information about the scm-commits mailing list