aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-05-09 10:13:14 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-05-14 11:26:04 +0000
commit3e92361534cdd02e8da8a5f7e8112361b1d6eb67 (patch)
tree0f8f82d01ddf696fd7f5d9017212050bfd366c07 /terminal.c
parentMerge branch 'vt-anywhere-cleanup' (diff)
xdg-activation: initial support for setting urgency using XDG activation
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/terminal.c b/terminal.c
index f3513a08..a9712789 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2632,16 +2632,24 @@ term_bell(struct terminal *term)
if (!term->kbd_focus) {
if (term->conf->bell.urgent) {
- /* There's no 'urgency' hint in Wayland - we just paint the
- * margins red */
- term->render.urgency = true;
- term_damage_margins(term);
+ if (!wayl_win_set_urgent(term->window)) {
+ /*
+ * Urgency (xdg-activation) is relatively new in
+ * Wayland. Fallback to our old, “faked”, urgency -
+ * rendering our window margins in red
+ */
+ term->render.urgency = true;
+ term_damage_margins(term);
+ }
}
+
if (term->conf->bell.notify)
notify_notify(term, "Bell", "Bell in terminal");
}
- if ((term->conf->bell.command.argv != NULL) && (!term->kbd_focus || term->conf->bell.command_focused)) {
+ if ((term->conf->bell.command.argv != NULL) &&
+ (!term->kbd_focus || term->conf->bell.command_focused))
+ {
int devnull = open("/dev/null", O_RDONLY);
spawn(term->reaper, NULL, term->conf->bell.command.argv, devnull, -1, -1);