notify: don’t emit notification when we’re focused

This commit is contained in:
Daniel Eklöf 2020-12-10 18:07:50 +01:00
parent 03cbb6ad90
commit 1d8410b7ae
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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); LOG_DBG("notify: title=\"%s\", msg=\"%s\"", title, msg);
if (term->kbd_focus) {
/* No notifications while were focused */
return;
}
if (title == NULL || body == NULL) if (title == NULL || body == NULL)
return; return;