client: emit class signal on focus
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
ee1a3f24d7
commit
cb2cad6b09
3
client.c
3
client.c
|
@ -317,6 +317,9 @@ client_focus_update(client_t *c)
|
|||
client_push(globalconf.L, c);
|
||||
luaA_dofunction_from_registry(globalconf.L, globalconf.hooks.focus, 1, 0);
|
||||
}
|
||||
|
||||
luaA_object_push(globalconf.L, c);
|
||||
luaA_class_emit_signal(globalconf.L, &client_class, "focus", 1);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -830,11 +830,11 @@ function property.set(c, prop, value)
|
|||
end
|
||||
|
||||
-- Register standards hooks
|
||||
hooks.focus.register(focus.history.add)
|
||||
capi.client.add_signal("focus", focus.history.add)
|
||||
hooks.unmanage.register(focus.history.delete)
|
||||
|
||||
hooks.property.register(urgent.add)
|
||||
hooks.focus.register(urgent.delete)
|
||||
capi.client.add_signal("focus", urgent.delete)
|
||||
hooks.unmanage.register(urgent.delete)
|
||||
|
||||
hooks.unmanage.register(floating.delete)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
-- Grab environment we need
|
||||
local ipairs = ipairs
|
||||
local type = type
|
||||
local capi = { screen = screen, client = client }
|
||||
local tag = require("awful.tag")
|
||||
local util = require("awful.util")
|
||||
local suit = require("awful.layout.suit")
|
||||
|
@ -131,7 +132,7 @@ hooks.wibox_position.register(function(wibox)
|
|||
end)
|
||||
|
||||
hooks.padding.register(function(screen) on_arrange(screen) end)
|
||||
hooks.focus.register(function(c) on_arrange(c.screen) end)
|
||||
capi.client.add_signal("focus", function(c) on_arrange(c.screen) end)
|
||||
hooks.clients.register(function()
|
||||
for screen = 1, capi.screen.count() do
|
||||
on_arrange(screen)
|
||||
|
|
|
@ -409,7 +409,7 @@ button_groups = { close_buttons,
|
|||
floating_buttons }
|
||||
|
||||
-- Register standards hooks
|
||||
hooks.focus.register(update)
|
||||
capi.client.add_signal("focus", update)
|
||||
hooks.unfocus.register(update)
|
||||
hooks.property.register(update)
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ function new(screen, label, buttons)
|
|||
end
|
||||
end
|
||||
local uc = function (c) return u(c.screen) end
|
||||
hooks.focus.register(uc)
|
||||
capi.client.add_signal("focus", uc)
|
||||
hooks.unfocus.register(uc)
|
||||
hooks.tags.register(u)
|
||||
hooks.tagged.register(uc)
|
||||
|
|
|
@ -58,7 +58,7 @@ function new(label, buttons)
|
|||
hooks.tags.register(u)
|
||||
hooks.clients.register(u)
|
||||
hooks.tagged.register(u)
|
||||
hooks.focus.register(u)
|
||||
capi.client.add_signal("focus", u)
|
||||
hooks.unfocus.register(u)
|
||||
hooks.property.register(function (c, prop)
|
||||
if type(c) ~= "client" then return end
|
||||
|
|
Loading…
Reference in New Issue