diff options
author | 2021-03-16 09:14:58 +0000 | |
---|---|---|
committer | 2021-03-16 09:14:58 +0000 | |
commit | 2b1e50bb102af0291af3cd37cce479ab3d05bcab (patch) | |
tree | 7c8c528e16ae3254cf9a079be1b818e7d869bf05 /usr.bin/tmux/control-notify.c | |
parent | Do not delete control socket upon exit (diff) | |
download | wireguard-openbsd-2b1e50bb102af0291af3cd37cce479ab3d05bcab.tar.xz wireguard-openbsd-2b1e50bb102af0291af3cd37cce479ab3d05bcab.zip |
Add client-detached notification in control mode, from Mohsin Kaleem.
Diffstat (limited to 'usr.bin/tmux/control-notify.c')
-rw-r--r-- | usr.bin/tmux/control-notify.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr.bin/tmux/control-notify.c b/usr.bin/tmux/control-notify.c index 5c8a9499b06..8cef39ae072 100644 --- a/usr.bin/tmux/control-notify.c +++ b/usr.bin/tmux/control-notify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: control-notify.c,v 1.28 2021/01/20 07:16:54 nicm Exp $ */ +/* $OpenBSD: control-notify.c,v 1.29 2021/03/16 09:14:58 nicm Exp $ */ /* * Copyright (c) 2012 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -172,6 +172,17 @@ control_notify_client_session_changed(struct client *cc) } void +control_notify_client_detached(struct client *cc) +{ + struct client *c; + + TAILQ_FOREACH(c, &clients, entry) { + if (CONTROL_SHOULD_NOTIFY_CLIENT(c)) + control_write(c, "%%client-detached %s", cc->name); + } +} + +void control_notify_session_renamed(struct session *s) { struct client *c; |