aboutsummaryrefslogtreecommitdiff
path: root/src/display.rs
diff options
context:
space:
mode:
authorBarret Rennie <barret@brennie.ca>2017-10-21 17:03:58 -0600
committerJoe Wilm <jwilm@users.noreply.github.com>2017-10-21 16:03:58 -0700
commitf6f2bcd024146678c7c206903453974cd0f392dc (patch)
tree1e0f6994dbcc14325275e4d79030093f80f07b78 /src/display.rs
parentb79574ee823900c21759628f92cf036271847afc (diff)
downloadalacritty-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.rs8
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();