awful.tag: Select the fallback layout from the list of layouts.

This isn't 100% consistent with the old fallback, but avoids the
case where it has an explicit list to pick from and picks something
else.
This commit is contained in:
Emmanuel Lepage Vallee 2018-12-24 23:56:45 -05:00
parent 831e92410e
commit 063ae48438
1 changed files with 7 additions and 1 deletions

View File

@ -862,7 +862,13 @@ function tag.object.set_layouts(self, layouts)
end
function tag.object.get_layout(t)
return tag.getproperty(t, "layout") or require("awful.layout.suit.floating")
local l = tag.getproperty(t, "layout")
if l then return l end
local layouts = tag.getproperty(t, "_layouts")
return layouts and layouts[1]
or require("awful.layout.suit.floating")
end
--- Set layout.