summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjjacky2013-05-06 11:09:14 +0200
committerOlivier Brunel2015-06-08 19:22:25 +0200
commitf91acdb1821ac1b31b98b5e1a112090f53cdbab6 (patch)
tree395845288f9610fa1c18b065b59d9c3b77c7eb7d
parent208b6478ffde910fa0207c0553e8c95b018d64e6 (diff)
downloadaur-f91acdb1821ac1b31b98b5e1a112090f53cdbab6.tar.gz
xfwm4-better-smartplacement: Update patch
Fix windows always in top-left corner when screen wasn't full; which also was a memory leak. Signed-off-by: Olivier Brunel <jjk@jjacky.com>
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Rewrote-smartPlacement.patch18
-rw-r--r--PKGBUILD4
3 files changed, 15 insertions, 11 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 3972fb8ddf24..075232391f80 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = xfwm4-better-smartplacement
pkgdesc = Xfce window manager w/ better smart placement of new windows
pkgver = 4.10.1
- pkgrel = 1
+ pkgrel = 2
url = http://www.xfce.org/
install = xfwm4-better-smartplacement.install
arch = i686
@@ -19,7 +19,7 @@ pkgbase = xfwm4-better-smartplacement
source = http://archive.xfce.org/src/xfce/xfwm4/4.10/xfwm4-4.10.1.tar.bz2
source = 0001-Rewrote-smartPlacement.patch
sha1sums = cbfb1beee0e952f133ef851526823b472992de1d
- sha1sums = 9f440ac5c6a5bb0343d3a5ebb077e9aaddf2073a
+ sha1sums = 8c0bc28a8ae5d3e9d516c1a3b271eab094b0dd88
pkgname = xfwm4-better-smartplacement
diff --git a/0001-Rewrote-smartPlacement.patch b/0001-Rewrote-smartPlacement.patch
index 8d8c8db6d1ec..184a552b38f7 100644
--- a/0001-Rewrote-smartPlacement.patch
+++ b/0001-Rewrote-smartPlacement.patch
@@ -1,4 +1,4 @@
-From dc5190f33feb7cc632279c673be827f45c6f4e75 Mon Sep 17 00:00:00 2001
+From ecbda020850598aaf0c05bc82ba449fb62c2363f Mon Sep 17 00:00:00 2001
From: jjacky <i.am.jack.mail@gmail.com>
Date: Fri, 5 Apr 2013 15:33:00 +0200
Subject: [PATCH] Rewrote smartPlacement()
@@ -17,11 +17,11 @@ snapper to the top/left borders, if we can we'll snap to the bottom/right ones.
Signed-off-by: jjacky <i.am.jack.mail@gmail.com>
---
- src/placement.c | 345 ++++++++++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 288 insertions(+), 57 deletions(-)
+ src/placement.c | 349 +++++++++++++++++++++++++++++++++++++++++++++++---------
+ 1 file changed, 292 insertions(+), 57 deletions(-)
diff --git a/src/placement.c b/src/placement.c
-index 01f2590..57277c1 100644
+index 01f2590..2831c65 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -533,16 +533,139 @@ clientAutoMaximize (Client * c, int full_w, int full_h)
@@ -170,7 +170,7 @@ index 01f2590..57277c1 100644
g_return_if_fail (c != NULL);
TRACE ("entering smartPlacement");
-@@ -552,70 +675,178 @@ smartPlacement (Client * c, int full_x, int full_y, int full_w, int full_h)
+@@ -552,70 +675,182 @@ smartPlacement (Client * c, int full_x, int full_y, int full_w, int full_h)
frame_width = frameWidth (c);
frame_left = frameLeft(c);
frame_top = frameTop (c);
@@ -178,12 +178,12 @@ index 01f2590..57277c1 100644
- test_y = 0;
- best_overlaps = 0.0;
- first = TRUE;
--
+
- xmax = full_x + full_w - c->width - frameRight (c);
- ymax = full_y + full_h - c->height - frameBottom (c);
- best_x = full_x + frameLeft (c);
- best_y = full_y + frameTop (c);
-
+-
- test_y = full_y + frameTop (c);
- do
+ /* region of the monitor (i.e. where we can/want to put the window) */
@@ -296,6 +296,7 @@ index 01f2590..57277c1 100644
+ if (!region_hole)
+ break;
+
++has_hole:
+ cairo_region_destroy (region_monitor);
+ cairo_region_destroy (region_used);
+
@@ -392,6 +393,9 @@ index 01f2590..57277c1 100644
- c->x = best_x;
- c->y = best_y;
++ if (region_hole)
++ goto has_hole;
++
+ cairo_region_destroy (region_monitor);
+ cairo_region_destroy (region_used);
+
diff --git a/PKGBUILD b/PKGBUILD
index fd981f2137e6..ba6f5f50b485 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
_pkgname=xfwm4
pkgname=$_pkgname-better-smartplacement
pkgver=4.10.1
-pkgrel=1
+pkgrel=2
pkgdesc="Xfce window manager w/ better smart placement of new windows"
arch=('i686' 'x86_64')
license=('GPL2')
@@ -20,7 +20,7 @@ install=${pkgname}.install
source=(http://archive.xfce.org/src/xfce/${_pkgname}/4.10/${_pkgname}-${pkgver}.tar.bz2
0001-Rewrote-smartPlacement.patch)
sha1sums=('cbfb1beee0e952f133ef851526823b472992de1d'
- '9f440ac5c6a5bb0343d3a5ebb077e9aaddf2073a')
+ '8c0bc28a8ae5d3e9d516c1a3b271eab094b0dd88')
prepare() {
cd ${srcdir}/${_pkgname}-${pkgver}