Merge pull request #720 from Elv13/allow_no_tag

awful.layout: Allow parameters to be called when no tags is selected
This commit is contained in:
Emmanuel Lepage Vallée 2016-02-29 04:10:14 -05:00
commit 78f93940c7
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 {}