diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-03-30 15:47:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-30 15:47:53 -0400 |
commit | 7eca02301ba309fa909ba9b12cb335f8f944f1ee (patch) | |
tree | 8616074124e558fb6787be9cb3336d61663d9a86 /sway/ipc-server.c | |
parent | 1c50d79e1940d9dce6217d0ca19611a19709120a (diff) | |
parent | 88f08a42f30c6d79adbc9c1d5d897113fcd3a6f4 (diff) | |
download | sway-7eca02301ba309fa909ba9b12cb335f8f944f1ee.tar.xz |
Merge pull request #1662 from swaywm/workspace-delete-fixes
Fix workspace deletion edge cases
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) { |