awful.tag: Fix handling of stateful layout in `new`

Fixes #3056.
This commit is contained in:
James Reed 2020-05-06 18:44:28 -06:00
parent 38848bff04
commit e21b85f5fd
No known key found for this signature in database
GPG Key ID: 0BE2BD33C5E8125E
1 changed files with 2 additions and 1 deletions

View File

@ -318,7 +318,8 @@ end
function tag.new(names, screen, layout) function tag.new(names, screen, layout)
screen = get_screen(screen or 1) screen = get_screen(screen or 1)
-- True if `layout` should be used as the layout of each created tag -- True if `layout` should be used as the layout of each created tag
local have_single_layout = (not layout) or (layout.arrange and layout.name) local have_single_layout = (not layout) or (type(layout) == 'function')
or (layout.arrange and layout.name)
local tags = {} local tags = {}
for id, name in ipairs(names) do for id, name in ipairs(names) do
local l = layout local l = layout