summaryrefslogtreecommitdiffstats
path: root/notify.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-04-14 08:01:33 +0100
committerThomas Adam <thomas@xteddy.org>2020-04-14 08:01:33 +0100
commit6d9b3704f58a9806912ac0a734ac996f96c22b68 (patch)
tree6e19406e5883c93f18bdca5f02990685b8fab301 /notify.c
parent653a159225609f7e5efb45bc78cdf7b480d7ef93 (diff)
parent63ec7918542a36ac9afa60b2e91f75337c5a91ff (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/notify.c b/notify.c
index d6a88a76..e5ce761b 100644
--- a/notify.c
+++ b/notify.c
@@ -157,7 +157,11 @@ notify_add(const char *name, struct cmd_find_state *fs, struct client *c,
struct session *s, struct window *w, struct window_pane *wp)
{
struct notify_entry *ne;
- struct cmdq_item *new_item;
+ struct cmdq_item *item;
+
+ item = cmdq_running(NULL);
+ if (item != NULL && (cmdq_get_flags(item) & CMDQ_STATE_NOHOOKS))
+ return;
ne = xcalloc(1, sizeof *ne);
ne->name = xstrdup(name);
@@ -182,8 +186,7 @@ notify_add(const char *name, struct cmd_find_state *fs, struct client *c,
if (ne->fs.s != NULL) /* cmd_find_valid_state needs session */
session_add_ref(ne->fs.s, __func__);
- new_item = cmdq_get_callback(notify_callback, ne);
- cmdq_append(NULL, new_item);
+ cmdq_append(NULL, cmdq_get_callback(notify_callback, ne));
}
void