summaryrefslogtreecommitdiffstats
path: root/notify.c
diff options
context:
space:
mode:
authornicm <nicm>2020-04-13 10:59:58 +0000
committernicm <nicm>2020-04-13 10:59:58 +0000
commit04cdd035250b93b728678d515b69690653dced4e (patch)
tree34edc5f4affb9a640a95c7d531eb06770b6ea3c9 /notify.c
parentc20eb0c0ae3347c768894a6355adfd7ebae6f2f3 (diff)
Also move cmdq_item and cmdq_list into cmd-queue.c (this is to make its
use more clearly defined and preparation for some future work).
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/notify.c b/notify.c
index 772b3e1f..8ce5e803 100644
--- a/notify.c
+++ b/notify.c
@@ -189,17 +189,18 @@ notify_add(const char *name, struct cmd_find_state *fs, struct client *c,
void
notify_hook(struct cmdq_item *item, const char *name)
{
- struct notify_entry ne;
+ struct cmd_find_state *target = cmdq_get_target(item);
+ struct notify_entry ne;
memset(&ne, 0, sizeof ne);
ne.name = name;
- cmd_find_copy_state(&ne.fs, &item->target);
+ cmd_find_copy_state(&ne.fs, target);
- ne.client = item->client;
- ne.session = item->target.s;
- ne.window = item->target.w;
- ne.pane = item->target.wp->id;
+ ne.client = cmdq_get_client(item);
+ ne.session = target->s;
+ ne.window = target->w;
+ ne.pane = target->wp->id;
notify_insert_hook(item, &ne);
}