summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Perier <mrpouet@gentoo.org>2010-01-31 17:00:46 +0000
committerRomain Perier <mrpouet@gentoo.org>2010-01-31 17:00:46 +0000
commit2fd465b63714b1128233eee64422c165bae0c8bf (patch)
tree198aeff5f2616e7f13ee8860dc34a5a7b2b35825 /x11-plugins
parentFix crash on opening windows, and placement mode. Replace URI per a bziped ta... (diff)
downloadgentoo-2-2fd465b63714b1128233eee64422c165bae0c8bf.tar.gz
gentoo-2-2fd465b63714b1128233eee64422c165bae0c8bf.tar.bz2
gentoo-2-2fd465b63714b1128233eee64422c165bae0c8bf.zip
Handle windows that have server border set properly (put plugin), per bug #302308. Many thanks to Denilson.
(Portage version: 2.2_rc62/cvs/Linux x86_64)
Diffstat (limited to 'x11-plugins')
-rw-r--r--x11-plugins/compiz-plugins-main/ChangeLog12
-rw-r--r--x11-plugins/compiz-plugins-main/compiz-plugins-main-0.8.4-r1.ebuild51
-rw-r--r--x11-plugins/compiz-plugins-main/files/compiz-plugins-main-0.8.4-put-plugin.patch184
3 files changed, 245 insertions, 2 deletions
diff --git a/x11-plugins/compiz-plugins-main/ChangeLog b/x11-plugins/compiz-plugins-main/ChangeLog
index 0a6987138449..4141685e9707 100644
--- a/x11-plugins/compiz-plugins-main/ChangeLog
+++ b/x11-plugins/compiz-plugins-main/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for x11-plugins/compiz-plugins-main
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-plugins/compiz-plugins-main/ChangeLog,v 1.9 2009/12/23 02:47:00 jmbsvicetto Exp $
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/x11-plugins/compiz-plugins-main/ChangeLog,v 1.10 2010/01/31 17:00:45 mrpouet Exp $
+
+*compiz-plugins-main-0.8.4-r1 (31 Jan 2010)
+
+ 31 Jan 2010; Romain Perier <mrpouet@gentoo.org>
+ +compiz-plugins-main-0.8.4-r1.ebuild,
+ +files/compiz-plugins-main-0.8.4-put-plugin.patch:
+ Handle windows that have server border set properly (put plugin),
+ per bug #302308. Many thanks to Denilson.
23 Dec 2009; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org>
compiz-plugins-main-0.8.4.ebuild:
diff --git a/x11-plugins/compiz-plugins-main/compiz-plugins-main-0.8.4-r1.ebuild b/x11-plugins/compiz-plugins-main/compiz-plugins-main-0.8.4-r1.ebuild
new file mode 100644
index 000000000000..98536d3e55a1
--- /dev/null
+++ b/x11-plugins/compiz-plugins-main/compiz-plugins-main-0.8.4-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/x11-plugins/compiz-plugins-main/compiz-plugins-main-0.8.4-r1.ebuild,v 1.1 2010/01/31 17:00:45 mrpouet Exp $
+
+EAPI="2"
+
+inherit eutils gnome2-utils
+
+DESCRIPTION="Compiz Fusion Window Decorator Plugins"
+HOMEPAGE="http://www.compiz.org/"
+SRC_URI="http://releases.compiz.org/${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
+IUSE="gnome"
+
+RDEPEND="
+ !x11-plugins/compiz-fusion-plugins-main
+ >=gnome-base/librsvg-2.14.0
+ media-libs/jpeg
+ x11-libs/cairo
+ ~x11-libs/compiz-bcop-${PV}
+ ~x11-wm/compiz-${PV}[gnome?]
+"
+
+DEPEND="${RDEPEND}
+ >=dev-util/intltool-0.35
+ >=dev-util/pkgconfig-0.19
+ >=sys-devel/gettext-0.15
+"
+
+src_prepare() {
+ use gnome || epatch "${FILESDIR}"/${PN}-no-gconf.patch
+ epatch "${FILESDIR}"/${P}-put-plugin.patch
+}
+
+src_configure() {
+ econf $(use_enable gnome schemas) || die "econf failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+}
+pkg_preinst() {
+ use gnome && gnome2_gconf_savelist
+}
+
+pkg_postinst() {
+ use gnome && gnome2_gconf_install
+}
diff --git a/x11-plugins/compiz-plugins-main/files/compiz-plugins-main-0.8.4-put-plugin.patch b/x11-plugins/compiz-plugins-main/files/compiz-plugins-main-0.8.4-put-plugin.patch
new file mode 100644
index 000000000000..b44081d91bc2
--- /dev/null
+++ b/x11-plugins/compiz-plugins-main/files/compiz-plugins-main-0.8.4-put-plugin.patch
@@ -0,0 +1,184 @@
+From dc097d85952f82b101ea897d33958582db2fa010 Mon Sep 17 00:00:00 2001
+From: Danny Baumann <dannybaumann@web.de>
+Date: Sun, 31 Jan 2010 13:11:44 +0000
+Subject: Handle windows that have server border set properly.
+
+---
+diff --git a/put.c b/put.c
+index daf268f..9870cd3 100644
+--- a/src/put/put.c
++++ b/src/put/put.c
+@@ -43,6 +43,14 @@
+ GET_PUT_SCREEN (w->screen, \
+ GET_PUT_DISPLAY (w->screen->display)))
+
++#define TOP_BORDER(w) ((w)->input.top)
++#define LEFT_BORDER(w) ((w)->input.left)
++#define RIGHT_BORDER(w) ((w)->input.right + 2 * (w)->serverBorderWidth)
++#define BOTTOM_BORDER(w) ((w)->input.bottom + 2 * (w)->serverBorderWidth)
++
++#define HALF_WIDTH(w) ((w)->serverWidth / 2 + (w)->serverBorderWidth)
++#define HALF_HEIGHT(w) ((w)->serverHeight / 2 + (w)->serverBorderWidth)
++
+ static int displayPrivateIndex;
+
+ typedef enum
+@@ -395,54 +403,56 @@ putGetDistance (CompWindow *w,
+ switch (type) {
+ case PutCenter:
+ /* center of the screen */
+- dx = (workArea.width / 2) - (w->serverWidth / 2) - (x - workArea.x);
+- dy = (workArea.height / 2) - (w->serverHeight / 2) - (y - workArea.y);
++ dx = (workArea.width / 2) - (w->serverWidth / 2) -
++ w->serverBorderWidth - (x - workArea.x);
++ dy = (workArea.height / 2) - (w->serverHeight / 2) -
++ w->serverBorderWidth - (y - workArea.y);
+ break;
+ case PutLeft:
+ /* center of the left edge */
+- dx = -(x - workArea.x) + w->input.left + putGetPadLeft (s);
+- dy = (workArea.height / 2) - (w->serverHeight / 2) - (y - workArea.y);
++ dx = -(x - workArea.x) + LEFT_BORDER (w) + putGetPadLeft (s);
++ dy = (workArea.height / 2) - HALF_HEIGHT (w) - (y - workArea.y);
+ break;
+ case PutTopLeft:
+ /* top left corner */
+- dx = -(x - workArea.x) + w->input.left + putGetPadLeft (s);
+- dy = -(y - workArea.y) + w->input.top + putGetPadTop (s);
++ dx = -(x - workArea.x) + LEFT_BORDER (w) + putGetPadLeft (s);
++ dy = -(y - workArea.y) + TOP_BORDER (w) + putGetPadTop (s);
+ break;
+ case PutTop:
+ /* center of top edge */
+- dx = (workArea.width / 2) - (w->serverWidth / 2) - (x - workArea.x);
+- dy = -(y - workArea.y) + w->input.top + putGetPadTop (s);
++ dx = (workArea.width / 2) - HALF_WIDTH (w) - (x - workArea.x);
++ dy = -(y - workArea.y) + TOP_BORDER (w) + putGetPadTop (s);
+ break;
+ case PutTopRight:
+ /* top right corner */
+ dx = workArea.width - w->serverWidth - (x - workArea.x) -
+- w->input.right - putGetPadRight (s);
+- dy = -(y - workArea.y) + w->input.top + putGetPadTop (s);
++ RIGHT_BORDER (w) - putGetPadRight (s);
++ dy = -(y - workArea.y) + TOP_BORDER (w) + putGetPadTop (s);
+ break;
+ case PutRight:
+ /* center of right edge */
+ dx = workArea.width - w->serverWidth - (x - workArea.x) -
+- w->input.right - putGetPadRight (s);
+- dy = (workArea.height / 2) - (w->serverHeight / 2) - (y - workArea.y);
++ RIGHT_BORDER (w) - putGetPadRight (s);
++ dy = (workArea.height / 2) - HALF_HEIGHT (w) - (y - workArea.y);
+ break;
+ case PutBottomRight:
+ /* bottom right corner */
+ dx = workArea.width - w->serverWidth - (x - workArea.x) -
+- w->input.right - putGetPadRight (s);
++ RIGHT_BORDER (w) - putGetPadRight (s);
+ dy = workArea.height - w->serverHeight - (y - workArea.y) -
+- w->input.bottom - putGetPadBottom (s);
++ BOTTOM_BORDER (w) - putGetPadBottom (s);
+ break;
+ case PutBottom:
+ /* center of bottom edge */
+- dx = (workArea.width / 2) - (w->serverWidth / 2) - (x - workArea.x);
++ dx = (workArea.width / 2) - HALF_WIDTH (w) - (x - workArea.x);
+ dy = workArea.height - w->serverHeight - (y - workArea.y) -
+- w->input.bottom - putGetPadBottom (s);
++ BOTTOM_BORDER (w) - putGetPadBottom (s);
+ break;
+ case PutBottomLeft:
+ /* bottom left corner */
+- dx = -(x - workArea.x) + w->input.left + putGetPadLeft (s);
++ dx = -(x - workArea.x) + LEFT_BORDER (w) + putGetPadLeft (s);
+ dy = workArea.height - w->serverHeight - (y - workArea.y) -
+- w->input.bottom - putGetPadBottom (s);
++ BOTTOM_BORDER (w) - putGetPadBottom (s);
+ break;
+ case PutRestore:
+ /* back to last position */
+@@ -538,16 +548,16 @@ putGetDistance (CompWindow *w,
+ if (posX < 0)
+ /* account for a specified negative position,
+ like geometry without (-0) */
+- dx = posX + s->width - w->serverWidth - x - w->input.right;
++ dx = posX + s->width - w->serverWidth - x - RIGHT_BORDER (w);
+ else
+- dx = posX - x + w->input.left;
++ dx = posX - x + LEFT_BORDER (w);
+
+ if (posY < 0)
+ /* account for a specified negative position,
+ like geometry without (-0) */
+- dy = posY + s->height - w->height - y - w->input.bottom;
++ dy = posY + s->height - w->serverHeight - y - BOTTOM_BORDER (w);
+ else
+- dy = posY - y + w->input.top;
++ dy = posY - y + TOP_BORDER (w);
+ break;
+ case PutRelative:
+ /* move window by offset */
+@@ -572,35 +582,35 @@ putGetDistance (CompWindow *w,
+ if (putGetWindowCenter (s))
+ {
+ /* window center */
+- dx = rx - (w->serverWidth / 2) - x;
+- dy = ry - (w->serverHeight / 2) - y;
++ dx = rx - HALF_WIDTH (w) - x;
++ dy = ry - HALF_HEIGHT (w) - y;
+ }
+ else if (rx < s->workArea.width / 2 &&
+ ry < s->workArea.height / 2)
+ {
+ /* top left quad */
+- dx = rx - x + w->input.left;
+- dy = ry - y + w->input.top;
++ dx = rx - x + LEFT_BORDER (w);
++ dy = ry - y + TOP_BORDER (w);
+ }
+ else if (rx < s->workArea.width / 2 &&
+ ry >= s->workArea.height / 2)
+ {
+ /* bottom left quad */
+- dx = rx - x + w->input.left;
+- dy = ry - w->height - y - w->input.bottom;
++ dx = rx - x + LEFT_BORDER (w);
++ dy = ry - w->serverHeight - y - BOTTOM_BORDER (w);
+ }
+ else if (rx >= s->workArea.width / 2 &&
+ ry < s->workArea.height / 2)
+ {
+ /* top right quad */
+- dx = rx - w->width - x - w->input.right;
+- dy = ry - y + w->input.top;
++ dx = rx - w->serverWidth - x - RIGHT_BORDER (w);
++ dy = ry - y + TOP_BORDER (w);
+ }
+ else
+ {
+ /* bottom right quad */
+- dx = rx - w->width - x - w->input.right;
+- dy = ry - w->height - y - w->input.bottom;
++ dx = rx - w->serverWidth - x - RIGHT_BORDER (w);
++ dy = ry - w->serverHeight - y - BOTTOM_BORDER (w);
+ }
+ }
+ else
+@@ -627,10 +637,10 @@ putGetDistance (CompWindow *w,
+ inDx = dxBefore = dx % s->width;
+ inDy = dyBefore = dy % s->height;
+
+- extents.left = x + inDx - w->input.left;
+- extents.top = y + inDy - w->input.top;
+- extents.right = x + inDx + w->serverWidth + w->input.right;
+- extents.bottom = y + inDy + w->serverHeight + w->input.bottom;
++ extents.left = x + inDx - LEFT_BORDER (w);
++ extents.top = y + inDy - TOP_BORDER (w);
++ extents.right = x + inDx + w->serverWidth + RIGHT_BORDER (w);
++ extents.bottom = y + inDy + w->serverHeight + BOTTOM_BORDER (w);
+
+ area.left = workArea.x + putGetPadLeft (s);
+ area.top = workArea.y + putGetPadTop (s);
+--
+cgit v0.8.2