aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2015-12-13 16:59:05 -0500
committerDrew DeVault <sir@cmpwn.com>2015-12-13 16:59:22 -0500
commit7868e44d3f4f89752baa315d62df2152daaa5b77 (patch)
tree4b45b5a8ece5dcfae6c729cb224a22a62774725a
parente2cb5e5420d93516d0ca2cf815410215cd0a2f37 (diff)
Notify IPC on workspace changes more frequently
-rw-r--r--sway/focus.c6
-rw-r--r--sway/workspace.c1
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) {
if (locked_container_focus || !c || !c->parent) {
return false;
}
+ swayc_t *active_ws = swayc_active_workspace();
+
swayc_log(L_DEBUG, c, "Setting focus to %p:%ld", c, c->handle);
// Get workspace for c, get that workspaces current focused container.
@@ -133,6 +135,10 @@ bool set_focused_container(swayc_t *c) {
}
}
}
+
+ if (active_ws != workspace) {
+ ipc_event_workspace(active_ws, workspace);
+ }
return true;
}
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 @@
#include <wlc/wlc.h>
#include <string.h>
#include <strings.h>
+#include "ipc-server.h"
#include "workspace.h"
#include "layout.h"
#include "list.h"