term: bell: simplify if-statement - we don’t need two nested levels

This commit is contained in:
Daniel Eklöf 2021-10-22 20:04:23 +02:00
parent 00c0bc12aa
commit db2529159c
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -3072,8 +3072,7 @@ term_bell(struct terminal *term)
if (!term->bell_action_enabled)
return;
if (!term->kbd_focus) {
if (term->conf->bell.urgent) {
if (term->conf->bell.urgent && !term->kbd_focus) {
if (!wayl_win_set_urgent(term->window)) {
/*
* Urgency (xdg-activation) is relatively new in
@ -3084,7 +3083,6 @@ term_bell(struct terminal *term)
term_damage_margins(term);
}
}
}
if (term->conf->bell.notify)
notify_notify(term, "Bell", "Bell in terminal");