diff --git a/lib/awful/widget/layout/grid.lua.in b/lib/awful/widget/layout/grid.lua.in index ede337603..632ee6a44 100644 --- a/lib/awful/widget/layout/grid.lua.in +++ b/lib/awful/widget/layout/grid.lua.in @@ -18,8 +18,6 @@ local clone = util.table.clone local margins = awful.widget.layout.margins local layout = awful.widget.layout ---module("awful.widget.layout.grid") - local M = {} @@ -79,7 +77,7 @@ end -- Places the widgets in a grid. -- @see awful.widget.layout for a luadoc -local function grid(bounds, widgets, screen) +function M.grid(bounds, widgets, screen) local widths = {} local heights = {} @@ -197,7 +195,6 @@ local function grid(bounds, widgets, screen) return geometries end ---setmetatable(_M, { __call = function(_, ...) return grid(...) end }) -return grid +return M -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/lib/awful/widget/layout/init.lua.in b/lib/awful/widget/layout/init.lua.in index d0b3ce91e..fea387248 100644 --- a/lib/awful/widget/layout/init.lua.in +++ b/lib/awful/widget/layout/init.lua.in @@ -85,6 +85,6 @@ require("awful.widget.layout.vertical") -- @return A table of geometries of all the widgets. -- @name grid -- @class function -grid = require("awful.widget.layout.grid") +grid = require("awful.widget.layout.grid").grid -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/lib/awful/widget/layout/linear_common.lua.in b/lib/awful/widget/layout/linear_common.lua.in index 9c6f168af..00c3fcec8 100644 --- a/lib/awful/widget/layout/linear_common.lua.in +++ b/lib/awful/widget/layout/linear_common.lua.in @@ -245,7 +245,7 @@ function linear_common.flex(idx, bounds, widgets, screen) insert(geometries, v) end elseif type(v) == "widget" then - g = v:extents(screen) + local g = v:extents(screen) -- resize to fit the width available if requested if v.resize and g.width > 0 and g.height > 0 then