Debounce audio bells

This commit is contained in:
Kovid Goyal 2017-11-20 17:43:02 +05:30
parent 25d7668b70
commit 02884c5045
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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();