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.
This commit is contained in:
Emmanuel Lepage Vallee 2016-02-29 02:46:55 -05:00
parent 9503110e44
commit 07631ccc9a
1 changed files with 2 additions and 4 deletions

View File

@ -132,15 +132,13 @@ function layout.parameters(t, screen)
screen = get_screen(screen) screen = get_screen(screen)
t = t or tag.selected(screen) t = t or tag.selected(screen)
if not t then return end screen = get_screen(t and tag.getscreen(t) or 1)
screen = get_screen(tag.getscreen(t) or 1)
local p = {} local p = {}
p.workarea = screen.workarea 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 -- Handle padding
local padding = ascreen.padding(screen) or {} local padding = ascreen.padding(screen) or {}