diff options
author | Drew DeVault <[email protected]> | 2018-03-30 13:56:31 -0400 |
---|---|---|
committer | Drew DeVault <[email protected]> | 2018-03-30 13:56:31 -0400 |
commit | b28e6d23698c98d616710c44a211a8121943b3ca (patch) | |
tree | a936026454d61aec5afb9929f76bc33564d0d050 /sway/ipc-server.c | |
parent | 49379dd0fc0758f89d7f4fa4fb5b08c7f4c26ae6 (diff) |
IPC fixes
Diffstat (limited to 'sway/ipc-server.c')
-rw-r--r-- | sway/ipc-server.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sway/ipc-server.c b/sway/ipc-server.c index 394161af..f1854bcc 100644 --- a/sway/ipc-server.c +++ b/sway/ipc-server.c @@ -398,6 +398,14 @@ static void ipc_get_workspaces_callback(struct sway_container *workspace, json_object_object_add(workspace_json, "focused", json_object_new_boolean(focused)); json_object_array_add((json_object *)data, workspace_json); + + focused_ws = sway_seat_get_focus_inactive(seat, workspace->parent); + if (focused_ws->type != C_WORKSPACE) { + focused_ws = container_parent(focused_ws, C_WORKSPACE); + } + bool visible = workspace == focused_ws; + json_object_object_add(workspace_json, "visible", + json_object_new_boolean(visible)); } void ipc_client_handle_command(struct ipc_client *client) { |