From ef2b18949c1c1b5cfc5c75645c338f2c0f30b598 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 18 May 2009 16:39:38 +0200 Subject: [PATCH] awful.tag: call property hooks on properties changes Signed-off-by: Julien Danjou --- lib/awful/layout/init.lua.in | 6 ++++++ lib/awful/tag.lua.in | 4 ---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/awful/layout/init.lua.in b/lib/awful/layout/init.lua.in index c0e20787..540403ff 100644 --- a/lib/awful/layout/init.lua.in +++ b/lib/awful/layout/init.lua.in @@ -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) diff --git a/lib/awful/tag.lua.in b/lib/awful/tag.lua.in index 1c3751de..c809d7f1 100644 --- a/lib/awful/tag.lua.in +++ b/lib/awful/tag.lua.in @@ -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