aboutsummaryrefslogtreecommitdiff
path: root/notify.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-12-10 17:07:50 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-12-10 17:07:50 +0000
commit1d8410b7ae3e356101b95b012e86d5c21c2e4f04 (patch)
tree0631edccd18f64f8db848e87311fab0b9ab40d1c /notify.c
parentnotify: break out desktop notifications from osc.c (diff)
notify: don’t emit notification when we’re focused
Diffstat (limited to 'notify.c')
-rw-r--r--notify.c5
1 files changed, 5 insertions, 0 deletions
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;