awful.tag: call property hooks on properties changes

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2009-05-18 16:39:38 +02:00
parent ca777201a7
commit ef2b18949c
2 changed files with 6 additions and 4 deletions

View File

@ -123,6 +123,12 @@ hooks.property.register(function (obj, prop)
or prop == "visible" then
on_arrange(obj.screen)
end
elseif objtype == "tag" then
if prop == "mwfact"
or prop == "nmaster"
or prop == "ncol" then
on_arrange(obj.screen)
end
end
end)
hooks.wibox_position.register(function(wibox)

View File

@ -12,7 +12,6 @@ local table = table
local setmetatable = setmetatable
local capi =
{
hooks = hooks,
screen = screen,
mouse = mouse
}
@ -106,7 +105,6 @@ function setmwfact(mwfact, t)
local t = t or selected()
if mwfact >= 0 and mwfact <= 1 then
setproperty(t, "mwfact", mwfact)
capi.hooks.arrange()(t.screen)
end
end
@ -130,7 +128,6 @@ function setnmaster(nmaster, t)
local t = t or selected()
if nmaster >= 0 then
setproperty(t, "nmaster", nmaster)
capi.hooks.arrange()(t.screen)
end
end
@ -169,7 +166,6 @@ function setncol(ncol, t)
local t = t or selected()
if ncol >= 1 then
setproperty(t, "ncol", ncol)
capi.hooks.arrange()(t.screen)
end
end