From 70ab5e771220f9ef467f66bc9d8f2ff1f9fd649c Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sun, 26 Sep 2021 13:50:57 -0700 Subject: [PATCH] implement beeps for Windows refs: #3 --- docs/config/lua/config/audible_bell.md | 2 +- window/src/os/windows/connection.rs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/config/lua/config/audible_bell.md b/docs/config/lua/config/audible_bell.md index 6ac682a94..fe8093afa 100644 --- a/docs/config/lua/config/audible_bell.md +++ b/docs/config/lua/config/audible_bell.md @@ -9,7 +9,7 @@ that wezterm makes when the bell rings. The follow are possible values: -* `"SystemBeep"` - perform the system beep or alert sound. This is the default. On some systems, it may not produce a beep sound. +* `"SystemBeep"` - perform the system beep or alert sound. This is the default. On Wayland systems, which have no system beep function, it does not produce a sound. * `"Disabled"` - don't make a sound diff --git a/window/src/os/windows/connection.rs b/window/src/os/windows/connection.rs index fb323d4de..b9d06062c 100644 --- a/window/src/os/windows/connection.rs +++ b/window/src/os/windows/connection.rs @@ -70,6 +70,12 @@ impl ConnectionOps for Connection { } } } + + fn beep(&self) { + unsafe { + MessageBeep(MB_OK); + } + } } impl Connection {