client: emit signal on manage
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
dc61d258f0
commit
7954f19417
|
@ -320,7 +320,7 @@ awful.hooks.mouse_enter.register(function (c)
|
|||
end)
|
||||
|
||||
-- Hook function to execute when a new client appears.
|
||||
awful.hooks.manage.register(function (c, startup)
|
||||
client.add_signal("manage", function (c, startup)
|
||||
-- If we are not managing this application at startup,
|
||||
-- move it to the screen where the mouse is.
|
||||
-- We only do it for filtered windows (i.e. no dock, etc).
|
||||
|
|
4
client.c
4
client.c
|
@ -616,6 +616,10 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int phys_screen,
|
|||
lua_pushboolean(globalconf.L, startup);
|
||||
luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.manage, 2, 0);
|
||||
}
|
||||
|
||||
luaA_object_push(globalconf.L, c);
|
||||
lua_pushboolean(globalconf.L, startup);
|
||||
luaA_class_emit_signal(globalconf.L, &client_class, "manage", 2);
|
||||
}
|
||||
|
||||
/** Compute client geometry with respect to its geometry hints.
|
||||
|
|
|
@ -569,7 +569,7 @@ function floating.set(c, s)
|
|||
end
|
||||
end
|
||||
|
||||
hooks.manage.register(function (c)
|
||||
capi.client.add_signal("manage", function (c)
|
||||
property.set(c, "floating_geometry", c:geometry())
|
||||
end)
|
||||
|
||||
|
|
|
@ -13,7 +13,8 @@ local setmetatable = setmetatable
|
|||
local capi =
|
||||
{
|
||||
screen = screen,
|
||||
mouse = mouse
|
||||
mouse = mouse,
|
||||
client = client
|
||||
}
|
||||
local hooks = require("awful.hooks")
|
||||
|
||||
|
@ -286,6 +287,6 @@ end
|
|||
|
||||
-- Register standards hooks
|
||||
hooks.tags.register(history.update)
|
||||
hooks.manage.register(withcurrent)
|
||||
capi.client.add_signal("manage", withcurrent)
|
||||
|
||||
-- vim: filetype=lua:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||
|
|
|
@ -9,7 +9,8 @@ local capi =
|
|||
{
|
||||
awesome = awesome,
|
||||
screen = screen,
|
||||
wibox = wibox
|
||||
wibox = wibox,
|
||||
client = client
|
||||
}
|
||||
local setmetatable = setmetatable
|
||||
local ipairs = ipairs
|
||||
|
@ -377,7 +378,7 @@ end
|
|||
|
||||
-- Hook registered to reset all wiboxes position.
|
||||
hooks.property.register(update_wiboxes_position)
|
||||
hooks.manage.register(update_wiboxes_on_struts)
|
||||
capi.client.add_signal("manage", update_wiboxes_on_struts)
|
||||
hooks.unmanage.register(update_wiboxes_on_struts)
|
||||
|
||||
setmetatable(_M, { __call = function(_, ...) return new(...) end })
|
||||
|
|
Loading…
Reference in New Issue