mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-13 05:33:51 -04:00
xdg-activation: initial support for setting urgency using XDG activation
This commit is contained in:
parent
95bbab8fba
commit
3e92361534
4 changed files with 89 additions and 10 deletions
18
terminal.c
18
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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue