diff options
author | nicm <nicm> | 2017-04-21 20:26:34 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-21 20:26:34 +0000 |
commit | efaf4c16cf9fafa940dfe16ec48ca4ff68082b47 (patch) | |
tree | b4ac4aa4f81ae7f5df53d7360cb2d7aef8cfd988 /notify.c | |
parent | 2ad09ab5af530ceb5fbbbe53ea99a73ef9ddbe49 (diff) | |
download | rtmux-efaf4c16cf9fafa940dfe16ec48ca4ff68082b47.tar.gz rtmux-efaf4c16cf9fafa940dfe16ec48ca4ff68082b47.tar.bz2 rtmux-efaf4c16cf9fafa940dfe16ec48ca4ff68082b47.zip |
Make the cmd_find_* functions more obvious when looking for a client,
rather than having it inside other functions. Should be no change to the
way targets are resolved just yet.
Diffstat (limited to 'notify.c')
-rw-r--r-- | notify.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -44,9 +44,9 @@ notify_hook(struct cmdq_item *item, struct notify_entry *ne) struct session *s = ne->session; struct window *w = ne->window; - cmd_find_clear_state(&fs, NULL, 0); + cmd_find_clear_state(&fs, 0); if (cmd_find_empty_state(&ne->fs) || !cmd_find_valid_state(&ne->fs)) - cmd_find_current(&fs, item, CMD_FIND_QUIET); + cmd_find_from_nothing(&fs); else cmd_find_copy_state(&fs, &ne->fs); @@ -164,10 +164,7 @@ notify_client(const char *name, struct client *c) { struct cmd_find_state fs; - if (c->session != NULL) - cmd_find_from_session(&fs, c->session); - else - cmd_find_current(&fs, NULL, CMD_FIND_QUIET); + cmd_find_from_client(&fs, c); notify_add(name, &fs, c, NULL, NULL, NULL); } @@ -179,7 +176,7 @@ notify_session(const char *name, struct session *s) if (session_alive(s)) cmd_find_from_session(&fs, s); else - cmd_find_current(&fs, NULL, CMD_FIND_QUIET); + cmd_find_from_nothing(&fs); notify_add(name, &fs, NULL, s, NULL, NULL); } |