]> git.sur5r.net Git - i3/i3/blobdiff - src/workspace.c
Implement the urgency hint for windows/workspaces
[i3/i3] / src / workspace.c
index e89591a26d670b6722465c53e1f0a368775b58c7..cafc85ebc9e25e786c90344d73cd81aca29d60a3 100644 (file)
@@ -351,3 +351,21 @@ void workspace_unmap_clients(xcb_connection_t *conn, Workspace *u_ws) {
         ignore_enter_notify_forall(conn, u_ws, false);
 }
 
+/*
+ * Goes through all clients on the given workspace and updates the workspace’s
+ * urgent flag accordingly.
+ *
+ */
+void workspace_update_urgent_flag(Workspace *ws) {
+        Client *current;
+
+        SLIST_FOREACH(current, &(ws->focus_stack), focus_clients) {
+                if (!current->urgent)
+                        continue;
+
+                ws->urgent = true;
+                return;
+        }
+
+        ws->urgent = false;
+}