From 8d9561036311621697711ec744c9a8bb13b407cd Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Sun, 10 Apr 2016 03:22:23 -0400 Subject: [PATCH] placement: Fix a minor issue with closest_corner It was using the wrong matrix in 2x2 mode. --- lib/awful/placement.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/awful/placement.lua b/lib/awful/placement.lua index cd1028cf6..9555afd88 100644 --- a/lib/awful/placement.lua +++ b/lib/awful/placement.lua @@ -405,7 +405,7 @@ function placement.closest_corner(d, args) local grid_size = args.include_sides and 3 or 2 -- If the point is in the center, use the closest corner - local corner = f(grid_size, corners3x3) or f(2, corners2x2) + local corner = grid_size == 3 and f(3, corners3x3) or f(2, corners2x2) -- Transpose the corner back to the original size local new_args = setmetatable({position = corner}, {__index=args})