Exit ipc_get_workspace_callback early
This commit is contained in:
parent
8efee109ad
commit
ddc09940b1
|
@ -379,7 +379,9 @@ void ipc_client_disconnect(struct ipc_client *client) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ipc_get_workspaces_callback(swayc_t *workspace, void *data) {
|
static void ipc_get_workspaces_callback(swayc_t *workspace, void *data) {
|
||||||
if (workspace->type == C_WORKSPACE) {
|
if (workspace->type != C_WORKSPACE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
json_object *workspace_json = ipc_json_describe_container(workspace);
|
json_object *workspace_json = ipc_json_describe_container(workspace);
|
||||||
// override the default focused indicator because
|
// override the default focused indicator because
|
||||||
// it's set differently for the get_workspaces reply
|
// it's set differently for the get_workspaces reply
|
||||||
|
@ -394,7 +396,6 @@ static void ipc_get_workspaces_callback(swayc_t *workspace, void *data) {
|
||||||
json_object_object_add(workspace_json, "focused",
|
json_object_object_add(workspace_json, "focused",
|
||||||
json_object_new_boolean(focused));
|
json_object_new_boolean(focused));
|
||||||
json_object_array_add((json_object *)data, workspace_json);
|
json_object_array_add((json_object *)data, workspace_json);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ipc_client_handle_command(struct ipc_client *client) {
|
void ipc_client_handle_command(struct ipc_client *client) {
|
||||||
|
|
Loading…
Reference in a new issue