mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-05-27 21:37:30 -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
|
|
@ -19,7 +19,7 @@ struct wl_list workspaces;
|
|||
|
||||
static void handle_ext_commit(struct wl_listener *listener, void *data);
|
||||
static struct wl_listener ext_manager_commit_listener = {.notify =
|
||||
handle_ext_commit};
|
||||
handle_ext_commit};
|
||||
|
||||
void goto_workspace(struct workspace *target) {
|
||||
uint32_t tag;
|
||||
|
|
|
|||
|
|
@ -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