From 65d71d0a5e66ec4b8f2d2112d870e34a7dfbd2fb Mon Sep 17 00:00:00 2001 From: taiyu Date: Mon, 2 Nov 2015 11:28:51 -0800 Subject: put ipc_event_workspace in update_focus --- sway/focus.c | 3 ++- sway/workspace.c | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'sway') diff --git a/sway/focus.c b/sway/focus.c index 7f0b1599..7eebf941 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -11,7 +11,6 @@ bool locked_container_focus = false; bool locked_view_focus = false; // switches parent focus to c. will switch it accordingly -// TODO: Everything needs a handle, so we can set front/back position properly static void update_focus(swayc_t *c) { // Handle if focus switches swayc_t *parent = c->parent; @@ -20,6 +19,7 @@ static void update_focus(swayc_t *c) { swayc_t *prev = parent->focused; // Set new focus parent->focused = c; + switch (c->type) { // Shouldnt happen case C_ROOT: return; @@ -32,6 +32,7 @@ static void update_focus(swayc_t *c) { // Case where workspace changes case C_WORKSPACE: if (prev) { + ipc_event_workspace(prev, c); // update visibility of old workspace update_visibility(prev); destroy_workspace(prev); diff --git a/sway/workspace.c b/sway/workspace.c index 604fc8e4..55b1ffbf 100644 --- a/sway/workspace.c +++ b/sway/workspace.c @@ -223,7 +223,5 @@ bool workspace_switch(swayc_t *workspace) { } arrange_windows(workspace, -1, -1); - ipc_event_workspace(active_ws, workspace); - return true; } -- cgit v1.2.3