projects
/
mikachu
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e72aa3e
)
Penalize #rects when placing
author
Mikael Magnusson
<mikachu@gmail.com>
Tue, 11 Nov 2014 13:53:40 +0000
(14:53 +0100)
committer
Mikael Magnusson
<mikachu@gmail.com>
Tue, 11 Nov 2014 13:53:40 +0000
(14:53 +0100)
openbox/place_overlap.c
patch
|
blob
|
history
diff --git
a/openbox/place_overlap.c
b/openbox/place_overlap.c
index
ed7ff6c
..
2857b89
100644
(file)
--- a/
openbox/place_overlap.c
+++ b/
openbox/place_overlap.c
@@
-167,7
+167,11
@@
static int total_overlap(const Rect* client_rects,
continue;
Rect rtemp;
RECT_SET_INTERSECTION(rtemp, *proposed_rect, client_rects[i]);
- overlap += RECT_AREA(rtemp);
+ /* somewhat penalize #rects, overlapping an additional client is
+ * only better if it saves ~75x75 pixels. This is so that we don't
+ * overlap a bunch of windows just because there's a small gap
+ * between them. */
+ overlap += RECT_AREA(rtemp) + 6000;
}
return overlap;
}