This event consists of a single serialized map containing a property
+change (string)+ which indicates the type of the change ("focus", "init",
-"empty").
+"empty", "urgent").
*Example:*
---------------------
*/
void workspace_update_urgent_flag(Workspace *ws) {
Client *current;
+ bool old_flag = ws->urgent;
+ bool urgent = false;
SLIST_FOREACH(current, &(ws->focus_stack), focus_clients) {
if (!current->urgent)
continue;
- ws->urgent = true;
- return;
+ urgent = true;
+ break;
}
- ws->urgent = false;
+ ws->urgent = urgent;
+
+ if (old_flag != urgent)
+ ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"urgent\"}");
}
/*