mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-24 12:55:41 +02:00
module/i3: implement 'urgent' event handling
This commit is contained in:
parent
b9b90d8b9e
commit
7b2dfd1399
1 changed files with 13 additions and 2 deletions
15
modules/i3.c
15
modules/i3.c
|
@ -348,8 +348,19 @@ handle_workspace_event(struct private *m, const struct json_object *json)
|
||||||
old_w->focused = false;
|
old_w->focused = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (strcmp(change_str, "urgent") == 0)
|
else if (strcmp(change_str, "urgent") == 0){
|
||||||
;
|
const struct json_object *urgent = json_object_object_get(current, "urgent");
|
||||||
|
if (urgent == NULL || !json_object_is_type(urgent, json_type_boolean)) {
|
||||||
|
LOG_ERR("'workspace' event's 'current' object did not "
|
||||||
|
"contain a 'urgent' boolean value");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct workspace *w = workspace_lookup(
|
||||||
|
m, json_object_get_string(current_name));
|
||||||
|
w->urgent = json_object_get_boolean(urgent);
|
||||||
|
}
|
||||||
|
|
||||||
else if (strcmp(change_str, "reload") == 0)
|
else if (strcmp(change_str, "reload") == 0)
|
||||||
LOG_WARN("unimplemented: 'reload' event");
|
LOG_WARN("unimplemented: 'reload' event");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue