awful.layout: register layout property change

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-05-18 17:13:51 +02:00
parent 5922eb1fc1
commit 2b80d94453
1 changed files with 4 additions and 7 deletions

View File

@ -13,11 +13,7 @@ local suit = require("awful.layout.suit")
local client = require("awful.client")
local wibox = require("awful.wibox")
local ascreen = require("awful.screen")
local capi =
{
hooks = hooks,
screen = screen
}
local capi = { screen = screen }
local hooks = require("awful.hooks")
--- Layout module for awful
@ -62,7 +58,6 @@ 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
-- Register an arrange hook.
@ -127,7 +122,9 @@ hooks.property.register(function (obj, prop)
elseif objtype == "tag" then
if prop == "mwfact"
or prop == "nmaster"
or prop == "ncol" then
or prop == "ncol"
or prop == "layout"
or prop == "windowfact" then
on_arrange(obj.screen)
end
end