mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
Debounce audio bells
This commit is contained in:
@@ -499,6 +499,10 @@ toggle_fullscreen(PyObject UNUSED *self) {
|
|||||||
|
|
||||||
void
|
void
|
||||||
ring_audio_bell(OSWindow *w) {
|
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__
|
#ifdef __APPLE__
|
||||||
(void)w;
|
(void)w;
|
||||||
cocoa_audio_bell();
|
cocoa_audio_bell();
|
||||||
|
|||||||
Reference in New Issue
Block a user