From 07631ccc9abb110d943001c55fdea0db635b3ac7 Mon Sep 17 00:00:00 2001 From: Emmanuel Lepage Vallee Date: Mon, 29 Feb 2016 02:46:55 -0500 Subject: [PATCH] awful.layout: Allow parameters to be called when no tags is selected There seem to be a little race condition (either in my layout code or elsewhere) when playing with multiple screens. As most properties do not depend on the tag, there is no point in returning early anyway. --- lib/awful/layout/init.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/awful/layout/init.lua b/lib/awful/layout/init.lua index de35637cc..dd81cba08 100644 --- a/lib/awful/layout/init.lua +++ b/lib/awful/layout/init.lua @@ -132,15 +132,13 @@ function layout.parameters(t, screen) screen = get_screen(screen) t = t or tag.selected(screen) - if not t then return end - - screen = get_screen(tag.getscreen(t) or 1) + screen = get_screen(t and tag.getscreen(t) or 1) local p = {} p.workarea = screen.workarea - local useless_gap = tag.getgap(t, #client.tiled(screen)) + local useless_gap = t and tag.getgap(t, #client.tiled(screen)) or 0 -- Handle padding local padding = ascreen.padding(screen) or {}