From 1d8410b7ae3e356101b95b012e86d5c21c2e4f04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Thu, 10 Dec 2020 18:07:50 +0100 Subject: [PATCH] =?UTF-8?q?notify:=20don=E2=80=99t=20emit=20notification?= =?UTF-8?q?=20when=20we=E2=80=99re=20focused?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- notify.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/notify.c b/notify.c index 293344ec..6f294458 100644 --- a/notify.c +++ b/notify.c @@ -19,6 +19,11 @@ notify_notify(const struct terminal *term, const char *title, const char *body) { LOG_DBG("notify: title=\"%s\", msg=\"%s\"", title, msg); + if (term->kbd_focus) { + /* No notifications while we’re focused */ + return; + } + if (title == NULL || body == NULL) return;