Add infrastructure to work out the best target given a pane or window

alone and use it to add pane_died and pane_exited hooks.
This commit is contained in:
nicm
2015-12-16 21:50:37 +00:00
parent 8eb1a7d5dc
commit 021c64310d
10 changed files with 91 additions and 13 deletions

View File

@ -283,7 +283,7 @@ server_client_detach(struct client *c, enum msgtype msgtype)
if (s == NULL)
return;
hooks_run(c->session->hooks, c, "client-detached");
hooks_run(c->session->hooks, c, NULL, "client-detached");
proc_send_s(c->peer, msgtype, s->name);
}
@ -1027,7 +1027,7 @@ server_client_dispatch(struct imsg *imsg, void *arg)
server_redraw_client(c);
}
if (c->session != NULL)
hooks_run(c->session->hooks, c, "client-resized");
hooks_run(c->session->hooks, c, NULL, "client-resized");
break;
case MSG_EXITING:
if (datalen != 0)