openbsd-ports/x11/awesome/patches/patch-lib_awful_placement_lua_in
dcoppa 4a237d064c From upstream git:
- Various bugfixes to Lua code.
- Fix a bug causing building with cmake 2.8.4 to fail (remove double
  slashes from icon path names).
2011-03-13 18:07:23 +00:00

25 lines
1.0 KiB
Plaintext

$OpenBSD: patch-lib_awful_placement_lua_in,v 1.1 2011/03/13 18:07:23 dcoppa Exp $
--- lib/awful/placement.lua.in.orig Mon Jan 17 12:38:13 2011
+++ lib/awful/placement.lua.in Thu Mar 10 17:23:35 2011
@@ -145,10 +145,19 @@ function no_overlap(c)
and r.width * r.height > new.width * new.height then
found = true
new = r
+ -- Check if the client's current position is available
+ -- and prefer that one (why move it around pointlessly?)
+ if geometry.x >= r.x
+ and geometry.y >= r.y
+ and geometry.x + geometry.width <= r.x + r.width
+ and geometry.y + geometry.height <= r.y + r.height then
+ new.x = geometry.x
+ new.y = geometry.y
+ end
end
end
- -- We did not foudn an area with enough space for our size:
+ -- We did not find an area with enough space for our size:
-- just take the biggest available one and go in
if not found then
for i, r in ipairs(areas) do