Convert some more code to "class signals"

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2010-08-26 18:42:38 +02:00
parent 32d389bb48
commit b6c8b95e34
2 changed files with 5 additions and 10 deletions

View File

@ -102,11 +102,9 @@ local function screen_change(window)
end end
end end
client.connect_signal("manage", function (c) client.connect_signal("request::maximized_horizontal", maximized_horizontal)
c:connect_signal("request::maximized_horizontal", maximized_horizontal) client.connect_signal("request::maximized_vertical", maximized_vertical)
c:connect_signal("request::maximized_vertical", maximized_vertical) client.connect_signal("request::fullscreen", fullscreen)
c:connect_signal("request::fullscreen", fullscreen) client.connect_signal("property::screen", screen_change)
c:connect_signal("property::screen", screen_change)
end)
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 -- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80

View File

@ -326,10 +326,7 @@ local function update_wiboxes_on_struts(c)
end end
-- Hook registered to reset all wiboxes position. -- Hook registered to reset all wiboxes position.
capi.client.connect_signal("manage", function(c) capi.client.connect_signal("property::struts", update_wiboxes_on_struts)
update_wiboxes_on_struts(c)
c:connect_signal("property::struts", update_wiboxes_on_struts)
end)
capi.client.connect_signal("unmanage", update_wiboxes_on_struts) capi.client.connect_signal("unmanage", update_wiboxes_on_struts)
setmetatable(_M, { __call = function(_, ...) return new(...) end }) setmetatable(_M, { __call = function(_, ...) return new(...) end })