summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Perier <mrpouet@gentoo.org>2010-01-31 16:49:45 +0000
committerRomain Perier <mrpouet@gentoo.org>2010-01-31 16:49:45 +0000
commit03bb29cf4c03b89a2bffea1100df3e2bbbd3d18b (patch)
tree0c69b774a5d1f625fd0cb8de2227f875623b6e97 /x11-wm/compiz
parentStable on amd64 wrt bug #302352 (diff)
downloadgentoo-2-03bb29cf4c03b89a2bffea1100df3e2bbbd3d18b.tar.gz
gentoo-2-03bb29cf4c03b89a2bffea1100df3e2bbbd3d18b.tar.bz2
gentoo-2-03bb29cf4c03b89a2bffea1100df3e2bbbd3d18b.zip
Fix crash on opening windows, and placement mode. Replace URI per a bziped tarball, per bug #302308. Many thanks to Denilson.
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'x11-wm/compiz')
-rw-r--r--x11-wm/compiz/ChangeLog12
-rw-r--r--x11-wm/compiz/compiz-0.8.4-r1.ebuild150
-rw-r--r--x11-wm/compiz/files/compiz-0.8.4-crash-on-opening-windows.patch82
-rw-r--r--x11-wm/compiz/files/compiz-0.8.4-place-plugin.patch103
4 files changed, 345 insertions, 2 deletions
diff --git a/x11-wm/compiz/ChangeLog b/x11-wm/compiz/ChangeLog
index ddf942f6ba40..ecc330ed9d95 100644
--- a/x11-wm/compiz/ChangeLog
+++ b/x11-wm/compiz/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for x11-wm/compiz
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-wm/compiz/ChangeLog,v 1.49 2009/12/20 15:20:25 mrpouet Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/compiz/ChangeLog,v 1.50 2010/01/31 16:49:44 mrpouet Exp $
+
+*compiz-0.8.4-r1 (31 Jan 2010)
+
+ 31 Jan 2010; Romain Perier <mrpouet@gentoo.org> +compiz-0.8.4-r1.ebuild,
+ +files/compiz-0.8.4-crash-on-opening-windows.patch,
+ +files/compiz-0.8.4-place-plugin.patch:
+ Fix crash on opening windows, and placement mode. Replace URI per a bziped
+ tarball, per bug #302308. Many thanks to Denilson.
20 Dec 2009; Romain Perier <mrpouet@gentoo.org> -compiz-0.8.2.ebuild:
Clean up old version
diff --git a/x11-wm/compiz/compiz-0.8.4-r1.ebuild b/x11-wm/compiz/compiz-0.8.4-r1.ebuild
new file mode 100644
index 000000000000..cf35ca2399b4
--- /dev/null
+++ b/x11-wm/compiz/compiz-0.8.4-r1.ebuild
@@ -0,0 +1,150 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-wm/compiz/compiz-0.8.4-r1.ebuild,v 1.1 2010/01/31 16:49:44 mrpouet Exp $
+
+EAPI="2"
+
+inherit autotools eutils gnome2-utils
+
+DESCRIPTION="3D composite and windowmanager"
+HOMEPAGE="http://www.compiz.org/"
+SRC_URI="http://releases.compiz.org/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2 LGPL-2.1 MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="+cairo dbus fuse gnome gtk kde +svg"
+
+DEPEND="
+ dev-libs/glib:2
+ dev-libs/libxml2
+ dev-libs/libxslt
+ media-libs/libpng
+ >=media-libs/mesa-6.5.1-r1
+ >=x11-base/xorg-server-1.1.1-r1
+ x11-libs/libX11[xcb]
+ x11-libs/libxcb
+ x11-libs/libXcomposite
+ x11-libs/libXdamage
+ x11-libs/libXinerama
+ x11-libs/libXrandr
+ x11-libs/libICE
+ x11-libs/libSM
+ >=x11-libs/libXrender-0.8.4
+ >=x11-libs/startup-notification-0.7
+ cairo? (
+ x11-libs/cairo[X]
+ )
+ dbus? ( >=sys-apps/dbus-1.0 )
+ fuse? ( sys-fs/fuse )
+ gnome? (
+ >=gnome-base/gnome-control-center-2.16.1:2
+ gnome-base/gnome-desktop
+ gnome-base/gconf:2
+ )
+ gtk? (
+ >=x11-libs/gtk+-2.8.0:2
+ >=x11-libs/libwnck-2.18.3
+ x11-libs/pango
+ )
+ kde? (
+ || (
+ >=kde-base/kwin-4.2.0
+ kde-base/kwin:live
+ )
+ )
+ svg? (
+ >=gnome-base/librsvg-2.14.0:2
+ >=x11-libs/cairo-1.0
+ )
+"
+
+RDEPEND="${DEPEND}
+ x11-apps/mesa-progs
+ x11-apps/xvinfo"
+
+DEPEND="${DEPEND}
+ dev-util/pkgconfig
+ x11-proto/damageproto
+ x11-proto/xineramaproto"
+
+src_prepare() {
+
+ echo "gtk/gnome/compiz-wm.desktop.in" >> "${S}/po/POTFILES.skip"
+ echo "metadata/core.xml.in" >> "${S}/po/POTFILES.skip"
+
+ # Missing gconf flags, fix bug #282807
+ epatch "${FILESDIR}"/${PN}-0.8.2-gtk-gnome-missing-gconf-flags.patch
+
+ # 2 bugfixes, per bug #302308
+ epatch "${FILESDIR}"/${P}-crash-on-opening-windows.patch
+ epatch "${FILESDIR}"/${P}-place-plugin.patch
+
+ if ! use gnome; then
+ epatch "${FILESDIR}"/${PN}-no-gconf.patch
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ econf --disable-dependency-tracking \
+ --disable-gnome-keybindings \
+ --enable-librsvg \
+ --with-default-plugins \
+ $(use_enable cairo annotate) \
+ $(use_enable dbus) \
+ $(use_enable dbus dbus-glib) \
+ $(use_enable fuse) \
+ $(use_enable gnome) \
+ $(use_enable gnome gconf) \
+ $(use_enable gnome metacity) \
+ $(use_enable gtk) \
+ $(use_enable kde kde4) \
+ --disable-kde
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ # Install compiz-manager
+ dobin "${FILESDIR}/compiz-manager" || die "dobin failed"
+
+ # Add the full-path to lspci
+ sed -i "s#lspci#/usr/sbin/lspci#" "${D}/usr/bin/compiz-manager" || die "sed 1 failed"
+
+ # Fix the hardcoded lib paths
+ sed -i "s#/lib/#/$(get_libdir)/#g" "${D}/usr/bin/compiz-manager" || die "sed 2 failed"
+
+ # Create gentoo's config file
+ dodir /etc/xdg/compiz || die "dodir failed"
+
+ cat <<- EOF > "${D}/etc/xdg/compiz/compiz-manager"
+ COMPIZ_BIN_PATH="/usr/bin/"
+ PLUGIN_PATH="/usr/$(get_libdir)/compiz/"
+ LIBGL_NVIDIA="/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2"
+ LIBGL_FGLRX="/usr/$(get_libdir)/opengl/xorg-x11/lib/libGL.so.1.2"
+ KWIN="$(type -p kwin)"
+ METACITY="$(type -p metacity)"
+ SKIP_CHECKS="yes"
+ EOF
+
+ dodoc AUTHORS ChangeLog NEWS README TODO || die "dodoc failed"
+
+ insinto "/usr/share/applications"
+ doins "${FILESDIR}/compiz.desktop" || die "Failed to install compiz.desktop"
+}
+
+pkg_preinst() {
+ use gnome && gnome2_gconf_savelist
+}
+
+pkg_postinst() {
+ use gnome && gnome2_gconf_install
+
+ ewarn "If you update to x11-wm/metacity-2.24 after you install ${P},"
+ ewarn "gtk-window-decorator will crash until you reinstall ${PN} again."
+}
+
+pkg_prerm() {
+ use gnome && gnome2_gconf_uninstall
+}
diff --git a/x11-wm/compiz/files/compiz-0.8.4-crash-on-opening-windows.patch b/x11-wm/compiz/files/compiz-0.8.4-crash-on-opening-windows.patch
new file mode 100644
index 000000000000..17a0c70a0fd1
--- /dev/null
+++ b/x11-wm/compiz/files/compiz-0.8.4-crash-on-opening-windows.patch
@@ -0,0 +1,82 @@
+From 43c269a377e7b446fb1bb70732835b7395ce9524 Mon Sep 17 00:00:00 2001
+From: Danny Baumann <dannybaumann@web.de>
+Date: Mon, 25 Jan 2010 06:28:34 +0000
+Subject: Fix crash on opening windows.
+
+We must defer match evaluation until window initialization has finished
+for all plugins as match evaluation means wrapped function calls.
+---
+diff --git a/plugins/obs.c b/plugins/obs.c
+index a8d67f1..0f5b9d0 100644
+--- a/plugins/obs.c
++++ b/plugins/obs.c
+@@ -88,6 +88,8 @@ typedef struct _ObsWindow
+ {
+ int customFactor[MODIFIER_COUNT];
+ int matchFactor[MODIFIER_COUNT];
++
++ CompTimeoutHandle updateHandle;
+ } ObsWindow;
+
+ #define GET_OBS_DISPLAY(d) \
+@@ -323,6 +325,22 @@ obsMatchPropertyChanged (CompDisplay *d,
+ WRAP (od, d, matchPropertyChanged, obsMatchPropertyChanged);
+ }
+
++static Bool
++obsUpdateWindow (void *closure)
++{
++ CompWindow *w = (CompWindow *) closure;
++ int i;
++
++ OBS_WINDOW (w);
++
++ for (i = 0; i < MODIFIER_COUNT; i++)
++ updatePaintModifier (w, i);
++
++ ow->updateHandle = 0;
++
++ return FALSE;
++}
++
+ static CompOption *
+ obsGetDisplayOptions (CompPlugin *p,
+ CompDisplay *display,
+@@ -628,8 +646,8 @@ static CompBool
+ obsInitWindow (CompPlugin *p,
+ CompWindow *w)
+ {
+- ObsWindow *ow;
+- int i;
++ ObsWindow *ow;
++ int i;
+
+ OBS_SCREEN (w->screen);
+
+@@ -643,10 +661,11 @@ obsInitWindow (CompPlugin *p,
+ ow->matchFactor[i] = 100;
+ }
+
+- w->base.privates[os->windowPrivateIndex].ptr = ow;
++ /* defer initializing the factors from window matches as match evalution
++ means wrapped function calls */
++ ow->updateHandle = compAddTimeout (0, 0, obsUpdateWindow, w);
+
+- for (i = 0; i < MODIFIER_COUNT; i++)
+- updatePaintModifier (w, i);
++ w->base.privates[os->windowPrivateIndex].ptr = ow;
+
+ return TRUE;
+ }
+@@ -657,6 +676,9 @@ obsFiniWindow (CompPlugin *p,
+ {
+ OBS_WINDOW (w);
+
++ if (ow->updateHandle)
++ compRemoveTimeout (ow->updateHandle);
++
+ free (ow);
+ }
+
+--
+cgit v0.8.2
diff --git a/x11-wm/compiz/files/compiz-0.8.4-place-plugin.patch b/x11-wm/compiz/files/compiz-0.8.4-place-plugin.patch
new file mode 100644
index 000000000000..ee258eb09714
--- /dev/null
+++ b/x11-wm/compiz/files/compiz-0.8.4-place-plugin.patch
@@ -0,0 +1,103 @@
+From db88fb6f3f6c0fa3c81bc04a2a3468252d49f098 Mon Sep 17 00:00:00 2001
+From: Danny Baumann <dannybaumann@web.de>
+Date: Sun, 31 Jan 2010 12:36:42 +0000
+Subject: Fix handling of windows that have a server border set.
+
+Also handle windows that have a server border set properly in pointer
+(placement mode)
+
+---
+diff --git a/plugins/place.c b/plugins/place.c
+index d59de33..a54e60a 100644
+--- a/plugins/place.c
++++ b/plugins/place.c
+@@ -131,12 +131,15 @@ typedef enum {
+
+ /* helper macros to get the full dimensions of a window,
+ including decorations */
++#define BORDER_WIDTH(w) ((w)->input.left + (w)->input.right + \
++ 2 * (w)->serverBorderWidth)
++#define BORDER_HEIGHT(w) ((w)->input.top + (w)->input.bottom + \
++ 2 * (w)->serverBorderWidth)
++
+ #define WIN_FULL_X(w) ((w)->serverX - (w)->input.left)
+ #define WIN_FULL_Y(w) ((w)->serverY - (w)->input.top)
+-#define WIN_FULL_W(w) ((w)->serverWidth + 2 * (w)->serverBorderWidth + \
+- (w)->input.left + (w)->input.right)
+-#define WIN_FULL_H(w) ((w)->serverHeight + 2 * (w)->serverBorderWidth + \
+- (w)->input.top + (w)->input.bottom)
++#define WIN_FULL_W(w) ((w)->serverWidth + BORDER_WIDTH (w))
++#define WIN_FULL_H(w) ((w)->serverHeight + BORDER_HEIGHT (w))
+
+ static Bool
+ placeMatchXYValue (CompWindow *w,
+@@ -1216,8 +1219,8 @@ placeConstrainToWorkarea (CompWindow *w,
+
+ 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;
++ extents.right = extents.left + WIN_FULL_W (w);
++ extents.bottom = extents.top + WIN_FULL_H (w);
+
+ delta = workArea->x + workArea->width - extents.right;
+ if (delta < 0)
+@@ -1419,9 +1422,9 @@ placeDoValidateWindowResizeRequest (CompWindow *w,
+ }
+
+ left = x - w->input.left;
+- right = x + xwc->width + w->input.right;
++ right = left + xwc->width + BORDER_WIDTH (w);
+ top = y - w->input.top;
+- bottom = y + xwc->height + w->input.bottom;
++ bottom = top + xwc->height + BORDER_HEIGHT (w);
+
+ output = outputDeviceForGeometry (s,
+ xwc->x, xwc->y,
+@@ -1484,9 +1487,9 @@ placeDoValidateWindowResizeRequest (CompWindow *w,
+
+ /* bring left/right/top/bottom to actual window coordinates */
+ left += w->input.left;
+- right -= w->input.right;
++ right -= w->input.right + 2 * w->serverBorderWidth;
+ top += w->input.top;
+- bottom -= w->input.bottom;
++ bottom -= w->input.bottom + 2 * w->serverBorderWidth;
+
+ if ((right - left) != xwc->width)
+ {
+@@ -1886,17 +1889,13 @@ placeDoHandleScreenSizeChange (CompScreen *s,
+ {
+ mask |= CWX | CWWidth;
+ xwc.x = vpX * s->width + workArea.x + w->input.left;
+- xwc.width = workArea.width -
+- (2 * w->serverBorderWidth +
+- w->input.left + w->input.right);
++ xwc.width = workArea.width - BORDER_WIDTH (w);
+ }
+ if (w->state & CompWindowStateMaximizedVertMask)
+ {
+ mask |= CWY | CWHeight;
+ xwc.y = vpY * s->height + workArea.y + w->input.top;
+- xwc.height = workArea.height -
+- (2 * w->serverBorderWidth +
+- w->input.top + w->input.bottom);
++ xwc.height = workArea.height - BORDER_HEIGHT (w);
+ }
+ }
+ }
+--- a/plugins/place.c
++++ b/plugins/place.c
+@@ -847,8 +847,8 @@ placePointer (CompWindow *w,
+
+ if (placeGetPointerPosition (w->screen, &xPointer, &yPointer))
+ {
+- *x = xPointer - (w->serverWidth / 2);
+- *y = yPointer - (w->serverHeight / 2);
++ *x = xPointer - (w->serverWidth / 2) - w->serverBorderWidth;
++ *y = yPointer - (w->serverHeight / 2) - w->serverBorderWidth;
+ }
+ else
+ {
+--
+cgit v0.8.2