[client] Execute hook on real focus

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-05-20 18:06:02 +02:00
parent 1f046b3c9f
commit ddae225363
1 changed files with 6 additions and 5 deletions

View File

@ -287,6 +287,12 @@ client_focus(client_t *c, int screen, bool raise)
* will appear under the mouse, grabbuttons */
window_grabbuttons(c->win, c->phys_screen);
phys_screen = c->phys_screen;
/* execute hook */
lc = lua_newuserdata(globalconf.L, sizeof(client_t *));
*lc = c;
luaA_settype(globalconf.L, "client");
luaA_dofunction(globalconf.L, globalconf.hooks.focus, 1);
}
else
{
@ -300,11 +306,6 @@ client_focus(client_t *c, int screen, bool raise)
ewmh_update_net_active_window(phys_screen);
widget_invalidate_cache(screen, WIDGET_CACHE_CLIENTS);
lc = lua_newuserdata(globalconf.L, sizeof(client_t *));
*lc = c;
luaA_settype(globalconf.L, "client");
luaA_dofunction(globalconf.L, globalconf.hooks.focus, 1);
return true;
}