awful.layout: make layout optional

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-02-27 15:40:01 +01:00
parent 84ee8f1f92
commit 122e1cc28a
1 changed files with 2 additions and 1 deletions

View File

@ -73,9 +73,10 @@ local function on_arrange (screen)
end
--- Get the current layout name.
-- @param layout the layout name.
-- @param layout The layout.
-- @return The layout name.
function getname(layout)
local layout = layout or get()
return layout.name
end