From 34290433c27ea743449a909afbb27c68577aabb4 Mon Sep 17 00:00:00 2001 From: actionless Date: Thu, 16 Jul 2015 12:22:14 +0200 Subject: [PATCH] feat(lib: awful: layout: suit: corner): add support for 'master_fill_policy' --- lib/awful/layout/suit/corner.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/awful/layout/suit/corner.lua b/lib/awful/layout/suit/corner.lua index a55ca473..2024f510 100644 --- a/lib/awful/layout/suit/corner.lua +++ b/lib/awful/layout/suit/corner.lua @@ -89,7 +89,7 @@ local function do_corner(p, orientation) row.x_increment = row.win_width row.win_idx = 0 - -- Extend master if there is only a few windows + -- Extend master if there is only a few windows and "expand" policy is set if #cls < 3 then if row_privileged then master.x = wa.x @@ -98,8 +98,13 @@ local function do_corner(p, orientation) master.y = wa.y master.height = wa.height end - if #cls < 2 then - master = wa + if #cls < 2 then + if tag.getmfpol(t) == "expand" then + master = wa + else + master.x = master.x + (wa.width - master.width)/2 + master.y = master.y + (wa.height - master.height)/2 + end end end