-/* $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>
}
}
+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)
{
-/* $OpenBSD: notify.c,v 1.36 2020/05/21 07:24:13 nicm Exp $ */
+/* $OpenBSD: notify.c,v 1.37 2021/03/16 09:14:58 nicm Exp $ */
/*
* Copyright (c) 2012 George Nachman <tmux@georgester.com>
control_notify_window_renamed(ne->window);
if (strcmp(ne->name, "client-session-changed") == 0)
control_notify_client_session_changed(ne->client);
+ if (strcmp(ne->name, "client-detached") == 0)
+ control_notify_client_detached(ne->client);
if (strcmp(ne->name, "session-renamed") == 0)
control_notify_session_renamed(ne->session);
if (strcmp(ne->name, "session-created") == 0)
-.\" $OpenBSD: tmux.1,v 1.829 2021/03/11 06:41:04 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.830 2021/03/16 09:14:58 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
.\"
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: March 11 2021 $
+.Dd $Mdocdate: March 16 2021 $
.Dt TMUX 1
.Os
.Sh NAME
.Pp
The following notifications are defined:
.Bl -tag -width Ds
+.It Ic %client-detached Ar client
+The client has detached.
.It Ic %client-session-changed Ar client session-id name
The client is now attached to the session with ID
.Ar session-id ,
-/* $OpenBSD: tmux.h,v 1.1099 2021/03/11 07:08:18 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.1100 2021/03/16 09:14:58 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
void control_notify_window_linked(struct session *, struct window *);
void control_notify_window_renamed(struct window *);
void control_notify_client_session_changed(struct client *);
+void control_notify_client_detached(struct client *);
void control_notify_session_renamed(struct session *);
void control_notify_session_created(struct session *);
void control_notify_session_closed(struct session *);