mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-06-01 21:37:35 -04:00
fix: avoid use null mon when in mmsg
This commit is contained in:
parent
9d96116fe5
commit
431b1c1282
2 changed files with 4 additions and 2 deletions
|
|
@ -154,11 +154,13 @@ static cJSON *monitor_active_tags(Monitor *m) {
|
|||
|
||||
static cJSON *build_client_json(Client *c) {
|
||||
cJSON *obj = cJSON_CreateObject();
|
||||
|
||||
cJSON_AddNumberToObject(obj, "id", c->id);
|
||||
cJSON_AddNumberToObject(obj, "pid", c->pid);
|
||||
cJSON_AddStringToObject(obj, "title", client_get_title(c));
|
||||
cJSON_AddStringToObject(obj, "appid", client_get_appid(c));
|
||||
cJSON_AddStringToObject(obj, "monitor", c->mon->wlr_output->name);
|
||||
cJSON_AddStringToObject(obj, "monitor",
|
||||
c->mon ? c->mon->wlr_output->name : "");
|
||||
cJSON_AddItemToObject(obj, "tags", tags_mask_to_array(c->tags));
|
||||
cJSON_AddBoolToObject(obj, "is_focused", c->isfocusing);
|
||||
cJSON_AddBoolToObject(obj, "is_fullscreen", c->isfullscreen);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue