Include workspace con in workspace event
Send the affected workspace in the "current" property for each workspace event for any type of workspace event that affects a particular workspace. fixes #1411
This commit is contained in:
committed by
Michael Stapelberg
parent
04fa40d3e5
commit
823b46a544
10
src/con.c
10
src/con.c
@ -12,6 +12,7 @@
|
||||
*
|
||||
*/
|
||||
#include "all.h"
|
||||
#include "yajl_utils.h"
|
||||
|
||||
static void con_on_remove_child(Con *con);
|
||||
|
||||
@ -1435,8 +1436,15 @@ static void con_on_remove_child(Con *con) {
|
||||
if (con->type == CT_WORKSPACE) {
|
||||
if (TAILQ_EMPTY(&(con->focus_head)) && !workspace_is_visible(con)) {
|
||||
LOG("Closing old workspace (%p / %s), it is empty\n", con, con->name);
|
||||
yajl_gen gen = ipc_marshal_workspace_event("empty", con, NULL);
|
||||
tree_close(con, DONT_KILL_WINDOW, false, false);
|
||||
ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"empty\"}");
|
||||
|
||||
const unsigned char *payload;
|
||||
ylength length;
|
||||
y(get_buf, &payload, &length);
|
||||
ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, (const char *)payload);
|
||||
|
||||
y(free);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user