summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/session.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2016-10-16 22:06:40 +0000
committernicm <nicm@openbsd.org>2016-10-16 22:06:40 +0000
commit2ae124fe486d7811b42e2daedf9d60322f1794d3 (patch)
tree3ba6edb7f45cafe7d15054b1d759a9425c8b0468 /usr.bin/tmux/session.c
parentUse closefrom(4) in privsep parent and avoid some global file (diff)
downloadwireguard-openbsd-2ae124fe486d7811b42e2daedf9d60322f1794d3.tar.xz
wireguard-openbsd-2ae124fe486d7811b42e2daedf9d60322f1794d3.zip
Use the notify name string instead of going via an enum and change
existing hooks to use notifys instead.
Diffstat (limited to 'usr.bin/tmux/session.c')
-rw-r--r--usr.bin/tmux/session.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr.bin/tmux/session.c b/usr.bin/tmux/session.c
index db791bc6937..f84d1689d6d 100644
--- a/usr.bin/tmux/session.c
+++ b/usr.bin/tmux/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.67 2016/10/15 09:27:52 nicm Exp $ */
+/* $OpenBSD: session.c,v 1.68 2016/10/16 22:06:40 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -169,7 +169,7 @@ session_create(const char *name, int argc, char **argv, const char *path,
}
log_debug("session %s created", s->name);
- notify_session_created(s);
+ notify_session("session-created", s);
return (s);
}
@@ -214,7 +214,7 @@ session_destroy(struct session *s)
s->curw = NULL;
RB_REMOVE(sessions, &sessions, s);
- notify_session_closed(s);
+ notify_session("session-closed", s);
free(s->tio);
@@ -227,7 +227,7 @@ session_destroy(struct session *s)
winlink_stack_remove(&s->lastw, TAILQ_FIRST(&s->lastw));
while (!RB_EMPTY(&s->windows)) {
wl = RB_ROOT(&s->windows);
- notify_window_unlinked(s, wl->window);
+ notify_session_window("window-unlinked", s, wl->window);
winlink_remove(&s->windows, wl);
}
@@ -357,7 +357,7 @@ session_new(struct session *s, const char *name, int argc, char **argv,
return (NULL);
}
winlink_set_window(wl, w);
- notify_window_linked(s, w);
+ notify_session_window("window-linked", s, w);
environ_free(env);
session_group_synchronize_from(s);
@@ -375,7 +375,7 @@ session_attach(struct session *s, struct window *w, int idx, char **cause)
return (NULL);
}
winlink_set_window(wl, w);
- notify_window_linked(s, w);
+ notify_session_window("window-linked", s, w);
session_group_synchronize_from(s);
return (wl);
@@ -391,7 +391,7 @@ session_detach(struct session *s, struct winlink *wl)
session_next(s, 0);
wl->flags &= ~WINLINK_ALERTFLAGS;
- notify_window_unlinked(s, wl->window);
+ notify_session_window("window-unlinked", s, wl->window);
winlink_stack_remove(&s->lastw, wl);
winlink_remove(&s->windows, wl);
@@ -681,7 +681,7 @@ session_group_synchronize1(struct session *target, struct session *s)
RB_FOREACH(wl, winlinks, ww) {
wl2 = winlink_add(&s->windows, wl->idx);
winlink_set_window(wl2, wl->window);
- notify_window_linked(s, wl2->window);
+ notify_session_window("window-linked", s, wl2->window);
wl2->flags |= wl->flags & WINLINK_ALERTFLAGS;
}
@@ -705,7 +705,7 @@ session_group_synchronize1(struct session *target, struct session *s)
wl = RB_ROOT(&old_windows);
wl2 = winlink_find_by_window_id(&s->windows, wl->window->id);
if (wl2 == NULL)
- notify_window_unlinked(s, wl->window);
+ notify_session_window("window-unlinked", s, wl->window);
winlink_remove(&old_windows, wl);
}
}