forked from external/yambar
module/i3: if a new workspace is created, but unfocused, assume it’s not empty
If a window is created on an unfocused workspace, yambar did not update the empty tag correctly. At least not for persistent workspaces. This is because yambar relies on focus events to determine a workspace's "empty" state. Since the new window, on the new workspace, isn't focused, there's no focus event, and yambar thinks the workspace is still empty. This patch changes the logic slightly; a new workspace is considered non-empty if it isn't focused (and has a non-zero node count). Closes #191
This commit is contained in:
parent
03e1c7dc13
commit
b0e132beaf
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ workspace_from_json(const struct json_object *json, struct workspace *ws)
|
||||||
.visible = json_object_get_boolean(visible),
|
.visible = json_object_get_boolean(visible),
|
||||||
.focused = json_object_get_boolean(focused),
|
.focused = json_object_get_boolean(focused),
|
||||||
.urgent = json_object_get_boolean(urgent),
|
.urgent = json_object_get_boolean(urgent),
|
||||||
.empty = is_empty,
|
.empty = is_empty && json_object_get_boolean(focused),
|
||||||
.window = {.title = NULL, .pid = -1},
|
.window = {.title = NULL, .pid = -1},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue