mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-20 06:05:16 +00:00
Debounce audio bells
This commit is contained in:
parent
25d7668b70
commit
02884c5045
1 changed files with 4 additions and 0 deletions
|
|
@ -499,6 +499,10 @@ toggle_fullscreen(PyObject UNUSED *self) {
|
|||
|
||||
void
|
||||
ring_audio_bell(OSWindow *w) {
|
||||
static double last_bell_at = -1;
|
||||
double now = monotonic();
|
||||
if (now - last_bell_at <= 0.1) return;
|
||||
last_bell_at = now;
|
||||
#ifdef __APPLE__
|
||||
(void)w;
|
||||
cocoa_audio_bell();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue