diff options
-rw-r--r-- | sway/focus.c | 6 | ||||
-rw-r--r-- | sway/workspace.c | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sway/focus.c b/sway/focus.c index ca56de4b..6911ac00 100644 --- a/sway/focus.c +++ b/sway/focus.c | |||
@@ -95,6 +95,8 @@ bool set_focused_container(swayc_t *c) { | |||
95 | if (locked_container_focus || !c || !c->parent) { | 95 | if (locked_container_focus || !c || !c->parent) { |
96 | return false; | 96 | return false; |
97 | } | 97 | } |
98 | swayc_t *active_ws = swayc_active_workspace(); | ||
99 | |||
98 | swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle); | 100 | swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle); |
99 | 101 | ||
100 | // Get workspace for c, get that workspaces current focused container. | 102 | // Get workspace for c, get that workspaces current focused container. |
@@ -133,6 +135,10 @@ bool set_focused_container(swayc_t *c) { | |||
133 | } | 135 | } |
134 | } | 136 | } |
135 | } | 137 | } |
138 | |||
139 | if (active_ws != workspace) { | ||
140 | ipc_event_workspace(active_ws, workspace); | ||
141 | } | ||
136 | return true; | 142 | return true; |
137 | } | 143 | } |
138 | 144 | ||
diff --git a/sway/workspace.c b/sway/workspace.c index 6c9a39e0..f7134917 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -3,6 +3,7 @@ | |||
3 | #include <wlc/wlc.h> | 3 | #include <wlc/wlc.h> |
4 | #include <string.h> | 4 | #include <string.h> |
5 | #include <strings.h> | 5 | #include <strings.h> |
6 | #include "ipc-server.h" | ||
6 | #include "workspace.h" | 7 | #include "workspace.h" |
7 | #include "layout.h" | 8 | #include "layout.h" |
8 | #include "list.h" | 9 | #include "list.h" |