modules: Warn for all unknown workspace events

This commit is contained in:
Timur Celik 2021-07-06 11:05:17 +02:00 committed by Daniel Eklöf
parent bbd2394601
commit 8f89545b32
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -355,12 +355,6 @@ handle_workspace_event(int type, const struct json_object *json, void *_mod)
bool is_focused = strcmp(change_str, "focus") == 0; bool is_focused = strcmp(change_str, "focus") == 0;
bool is_rename = strcmp(change_str, "rename") == 0; bool is_rename = strcmp(change_str, "rename") == 0;
bool is_urgent = strcmp(change_str, "urgent") == 0; bool is_urgent = strcmp(change_str, "urgent") == 0;
bool is_reload = strcmp(change_str, "reload") == 0;
if (is_reload) {
LOG_WARN("unimplemented: 'reload' event");
return true;
}
struct json_object *current, *_current_id; struct json_object *current, *_current_id;
if (!json_object_object_get_ex(json, "current", &current) || if (!json_object_object_get_ex(json, "current", &current) ||
@ -464,6 +458,10 @@ handle_workspace_event(int type, const struct json_object *json, void *_mod)
w->urgent = json_object_get_boolean(urgent); w->urgent = json_object_get_boolean(urgent);
} }
else {
LOG_WARN("unimplemented workspace event '%s'", change_str);
}
m->dirty = true; m->dirty = true;
mtx_unlock(&mod->lock); mtx_unlock(&mod->lock);
return true; return true;