Implement the window::urgent event

The window::urgent event is emitted when a container becomes urgent or
loses its urgent status.
This commit is contained in:
Tony Crisci
2014-06-20 08:33:02 -04:00
committed by Michael Stapelberg
parent a9c094b731
commit 682fb0a291
4 changed files with 84 additions and 8 deletions

View File

@ -231,6 +231,7 @@ void con_focus(Con *con) {
con->urgent = false;
con_update_parents_urgency(con);
workspace_update_urgent_flag(con_get_workspace(con));
ipc_send_window_event("urgent", con);
}
}
@ -1599,14 +1600,16 @@ void con_set_urgency(Con *con, bool urgent) {
con_update_parents_urgency(con);
if (con->urgent == urgent)
LOG("Urgency flag changed to %d\n", con->urgent);
Con *ws;
/* Set the urgency flag on the workspace, if a workspace could be found
* (for dock clients, that is not the case). */
if ((ws = con_get_workspace(con)) != NULL)
workspace_update_urgent_flag(ws);
if (con->urgent == urgent) {
LOG("Urgency flag changed to %d\n", con->urgent);
ipc_send_window_event("urgent", con);
}
}
/*