diff options
author | jjacky | 2013-05-06 11:09:14 +0200 |
---|---|---|
committer | Olivier Brunel | 2015-06-08 19:22:25 +0200 |
commit | f91acdb1821ac1b31b98b5e1a112090f53cdbab6 (patch) | |
tree | 395845288f9610fa1c18b065b59d9c3b77c7eb7d /0001-Rewrote-smartPlacement.patch | |
parent | 208b6478ffde910fa0207c0553e8c95b018d64e6 (diff) | |
download | aur-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>
Diffstat (limited to '0001-Rewrote-smartPlacement.patch')
-rw-r--r-- | 0001-Rewrote-smartPlacement.patch | 18 |
1 files changed, 11 insertions, 7 deletions
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); + |