client: execute urgent hook also when removing urgent hint
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
2da065329b
commit
e25ed3d8a5
6
client.c
6
client.c
|
@ -722,9 +722,13 @@ client_updatewmhints(client_t *c)
|
|||
|
||||
if((wmh = xcb_get_wm_hints(globalconf.connection, c->win)))
|
||||
{
|
||||
bool isurgent;
|
||||
wm_hints_flags = xcb_wm_hints_get_flags(wmh);
|
||||
if((c->isurgent = xcb_wm_hints_get_urgency(wmh)))
|
||||
isurgent = xcb_wm_hints_get_urgency(wmh);
|
||||
if(isurgent != c->isurgent)
|
||||
{
|
||||
c->isurgent = isurgent;
|
||||
|
||||
/* execute hook */
|
||||
luaA_client_userdata_new(globalconf.L, c);
|
||||
luaA_dofunction(globalconf.L, globalconf.hooks.urgent, 1, 0);
|
||||
|
|
11
ewmh.c
11
ewmh.c
|
@ -353,13 +353,12 @@ ewmh_process_state_atom(client_t *c, xcb_atom_t state, int set)
|
|||
if(set == _NET_WM_STATE_REMOVE)
|
||||
c->isurgent = false;
|
||||
else if(set == _NET_WM_STATE_ADD)
|
||||
{
|
||||
c->isurgent = true;
|
||||
/* execute hook */
|
||||
luaA_client_userdata_new(globalconf.L, c);
|
||||
luaA_dofunction(globalconf.L, globalconf.hooks.urgent, 1, 0);
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
}
|
||||
|
||||
/* execute hook */
|
||||
luaA_client_userdata_new(globalconf.L, c);
|
||||
luaA_dofunction(globalconf.L, globalconf.hooks.urgent, 1, 0);
|
||||
widget_invalidate_cache(c->screen, WIDGET_CACHE_CLIENTS);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue