diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-05-14 12:23:19 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-05-14 12:23:19 +0000 |
| commit | 92e517ae34243d9c294e966221f5a4589684a9b5 (patch) | |
| tree | 2fb1774c2e62ada3c387b71e577bcee3c0960d63 /terminal.c | |
| parent | Merge branch 'vt-anywhere-cleanup' (diff) | |
| parent | changeloge: xdg-activation support (diff) | |
Merge branch 'xdg-activation'
Closes #487
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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); |
