From 6432d44020443bbda90bd46ffcb572b51be803a1 Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Fri, 28 Feb 2014 14:21:46 +0000 Subject: [PATCH] hw/xwin: Silence bell when volume is zero Allow the bell to be turned off with X server option '-f 0', or by 'xset b off'. Signed-off-by: Colin Harrison Reviewed-by: Jon TURNEY --- hw/xwin/winkeybd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index b6b208612..3a75ab268 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -128,7 +128,7 @@ winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, void *pCtrl, int iClass) * sound on systems with a sound card or it will beep the PC speaker * on systems that do not have a sound card. */ - MessageBeep(MB_OK); + if (iPercent > 0) MessageBeep(MB_OK); } /* Change some keyboard configuration parameters */