diff options
author | Barret Rennie <barret@brennie.ca> | 2017-10-21 17:03:58 -0600 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-10-21 16:03:58 -0700 |
commit | f6f2bcd024146678c7c206903453974cd0f392dc (patch) | |
tree | 1e0f6994dbcc14325275e4d79030093f80f07b78 /src/display.rs | |
parent | b79574ee823900c21759628f92cf036271847afc (diff) | |
download | alacritty-f6f2bcd024146678c7c206903453974cd0f392dc.tar.gz alacritty-f6f2bcd024146678c7c206903453974cd0f392dc.zip |
Set urgent WM flag on bell on X11 systems (#812)
Sets the urgent WM flag when bell is emitted on X11 systems.
Additionally, the flag is cleared on focus because not all WMs clear it
automatically.
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/display.rs b/src/display.rs index bdd9a9f2..fc5a5d40 100644 --- a/src/display.rs +++ b/src/display.rs @@ -322,6 +322,14 @@ impl Display { self.window.set_title(&title); } + if let Some(is_urgent) = terminal.next_is_urgent.take() { + // We don't need to set the urgent flag if we already have the + // user's attention. + if !is_urgent || !self.window.is_focused { + self.window.set_urgent(is_urgent); + } + } + let size_info = *terminal.size_info(); let visual_bell_intensity = terminal.visual_bell.intensity(); |