diff options
author | nicm <nicm> | 2017-04-21 14:09:44 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-21 14:09:44 +0000 |
commit | c799425069d02675474cda312fac1457829052fb (patch) | |
tree | 072ca7fbea547071b5f4a14de7edc166bf0ac51c | |
parent | 428be9803cab5121bc8ccad5ecbcce509c57b3a1 (diff) | |
download | rtmux-c799425069d02675474cda312fac1457829052fb.tar.gz rtmux-c799425069d02675474cda312fac1457829052fb.tar.bz2 rtmux-c799425069d02675474cda312fac1457829052fb.zip |
More unnecessary arguments now winlink points back to session.
-rw-r--r-- | alerts.c | 6 | ||||
-rw-r--r-- | cmd-find.c | 5 | ||||
-rw-r--r-- | cmd-new-window.c | 2 | ||||
-rw-r--r-- | notify.c | 6 | ||||
-rw-r--r-- | tmux.h | 4 |
5 files changed, 11 insertions, 12 deletions
@@ -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; @@ -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; diff --git a/cmd-new-window.c b/cmd-new-window.c index c10a4aaf..e99a8089 100644 --- a/cmd-new-window.c +++ b/cmd-new-window.c @@ -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); @@ -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 @@ -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 *); |