More unnecessary arguments now winlink points back to session.

pull/871/head
nicm 2017-04-21 14:09:44 +00:00
parent 428be9803c
commit c799425069
5 changed files with 11 additions and 12 deletions

View File

@ -178,7 +178,7 @@ alerts_check_bell(struct window *w)
s = wl->session;
if (s->curw != wl) {
wl->flags |= WINLINK_BELL;
notify_winlink("alert-bell", s, wl);
notify_winlink("alert-bell", wl);
}
if (s->flags & SESSION_ALERTED)
@ -239,7 +239,7 @@ alerts_check_activity(struct window *w)
continue;
wl->flags |= WINLINK_ACTIVITY;
notify_winlink("alert-activity", s, wl);
notify_winlink("alert-activity", wl);
if (s->flags & SESSION_ALERTED)
continue;
@ -275,7 +275,7 @@ alerts_check_silence(struct window *w)
if (s->curw == wl)
continue;
wl->flags |= WINLINK_SILENCE;
notify_winlink("alert-silence", s, wl);
notify_winlink("alert-silence", wl);
if (s->flags & SESSION_ALERTED)
continue;

View File

@ -895,12 +895,11 @@ cmd_find_from_session(struct cmd_find_state *fs, struct session *s)
/* Find state from a winlink. */
int
cmd_find_from_winlink(struct cmd_find_state *fs, struct session *s,
struct winlink *wl)
cmd_find_from_winlink(struct cmd_find_state *fs, struct winlink *wl)
{
cmd_find_clear_state(fs, NULL, 0);
fs->s = s;
fs->s = wl->session;
fs->wl = wl;
fs->w = wl->window;
fs->wp = wl->window->active;

View File

@ -147,7 +147,7 @@ cmd_new_window_exec(struct cmd *self, struct cmdq_item *item)
if (to_free != NULL)
free((void *)to_free);
cmd_find_from_winlink(&fs, s, wl);
cmd_find_from_winlink(&fs, wl);
hooks_insert(s->hooks, item, &fs, "after-new-window");
return (CMD_RETURN_NORMAL);

View File

@ -184,12 +184,12 @@ notify_session(const char *name, struct session *s)
}
void
notify_winlink(const char *name, struct session *s, struct winlink *wl)
notify_winlink(const char *name, struct winlink *wl)
{
struct cmd_find_state fs;
cmd_find_from_winlink(&fs, s, wl);
notify_add(name, &fs, NULL, s, wl->window, NULL);
cmd_find_from_winlink(&fs, wl);
notify_add(name, &fs, NULL, wl->session, wl->window, NULL);
}
void

4
tmux.h
View File

@ -1563,7 +1563,7 @@ void printflike(4, 5) hooks_insert(struct hooks *, struct cmdq_item *,
void notify_input(struct window_pane *, struct evbuffer *);
void notify_client(const char *, struct client *);
void notify_session(const char *, struct session *);
void notify_winlink(const char *, struct session *, struct winlink *);
void notify_winlink(const char *, struct winlink *);
void notify_session_window(const char *, struct session *, struct window *);
void notify_window(const char *, struct window *);
void notify_pane(const char *, struct window_pane *);
@ -1747,7 +1747,7 @@ void cmd_find_log_state(const char *, struct cmd_find_state *);
int cmd_find_from_session(struct cmd_find_state *,
struct session *);
int cmd_find_from_winlink(struct cmd_find_state *,
struct session *, struct winlink *);
struct winlink *);
int cmd_find_from_session_window(struct cmd_find_state *,
struct session *, struct window *);
int cmd_find_from_window(struct cmd_find_state *, struct window *);