aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBarret Rennie <barret@brennie.ca>2018-12-02 11:11:51 -0500
committerChristian Duerr <chrisduerr@users.noreply.github.com>2018-12-02 16:11:51 +0000
commitca9a259caa59e48db3bdfdf021ee26c8bb85be99 (patch)
treeb00bf0b62dbc8fc9ba67dda75230c690f3197469 /src
parente690a1444e110585a3b9ac1c97115004791726c5 (diff)
downloadalacritty-ca9a259caa59e48db3bdfdf021ee26c8bb85be99.tar.gz
alacritty-ca9a259caa59e48db3bdfdf021ee26c8bb85be99.zip
Request user attention when bell received in macOS
We now request the user's attention in macOS when a visual bell character is received. This manifests as the window jumping up and down in the dock.
Diffstat (limited to 'src')
-rw-r--r--src/window.rs17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/window.rs b/src/window.rs
index de3eb9a6..82d465f2 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -361,16 +361,13 @@ impl Window {
self.window.set_urgent(is_urgent);
}
- #[cfg(
- not(
- any(
- target_os = "linux",
- target_os = "freebsd",
- target_os = "dragonfly",
- target_os = "openbsd"
- )
- )
- )]
+ #[cfg(target_os = "macos")]
+ pub fn set_urgent(&self, is_urgent: bool) {
+ use glutin::os::macos::WindowExt;
+ self.window.request_user_attention(is_urgent);
+ }
+
+ #[cfg(windows)]
pub fn set_urgent(&self, _is_urgent: bool) {}
pub fn set_ime_spot(&self, pos: LogicalPosition) {