awful.layout: call layout hook on layout set

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-05-18 16:18:14 +02:00
parent 332e2cb8e8
commit e59f28a556
1 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,9 @@ local hooks = require("awful.hooks")
--- Layout module for awful
module("awful.layout")
-- Create a hook to call when changing layout
hooks.user.create("layout")
--- Get the current layout.
-- @param screen The screen number.
-- @return The layout function.
@ -58,6 +61,7 @@ end
function set(layout, t)
t = t or tag.selected()
tag.setproperty(t, "layout", layout)
hooks.user.call("layout", t, layout)
capi.hooks.arrange()(t.screen)
end