mirror of
https://github.com/swaywm/sway.git
synced 2024-11-23 00:11:28 +00:00
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) {
|
||||
if (workspace->type == C_WORKSPACE) {
|
||||
if (workspace->type != C_WORKSPACE) {
|
||||
return;
|
||||
}
|
||||
json_object *workspace_json = ipc_json_describe_container(workspace);
|
||||
// override the default focused indicator because
|
||||
// it's set differently for the get_workspaces reply
|
||||
|
@ -395,7 +397,6 @@ static void ipc_get_workspaces_callback(swayc_t *workspace, void *data) {
|
|||
json_object_new_boolean(focused));
|
||||
json_object_array_add((json_object *)data, workspace_json);
|
||||
}
|
||||
}
|
||||
|
||||
void ipc_client_handle_command(struct ipc_client *client) {
|
||||
if (!sway_assert(client != NULL, "client != NULL")) {
|
||||
|
|
Loading…
Reference in a new issue