keyboard bell woes (ignores xset)
Jeremy Huddleston
jeremyhu at apple.com
Tue Mar 16 11:47:34 PDT 2010
I turn off the bell using 'xset -b' :
~ $ xset -q | grep bell
bell percent: 0 bell pitch: 400 bell duration: 100
but when I do XBell(dpy, 100), the bell still rings at volume 100.
#0 DDXRingBell (volume=100, pitch=400, duration=100) at quartzAudio.c:223
#1 0x0000000100138ba2 in CoreKeyboardBell (volume=100, pDev=0x115b708e0, arg=0x115b71100, something=0) at devices.c:498
#2 0x0000000100105114 in XkbHandleBell (force=0 '\0', eventOnly=0 '\0', kbd=0x115b708e0, percent=100 'd', pCtrl=0x115b71100, class=0 '\0', name=0, pWin=0x0, pClient=0x115e11c00) at xkbEvents.c:514
Shouldn't the bell percent set by 'xset' be multiplied by the volume passed to XBell? From XBell(3):
"""
The XBell function rings the bell on the keyboard on the specified display, if possible. The specified
volume is relative to the base volume for the keyboard. If the value for the percent argument is not in
the range -100 to 100 inclusive, a BadValue error results. The volume at which the bell rings when the
percent argument is nonnegative is:
base - [(base * percent) / 100] + percent
The volume at which the bell rings when the percent argument is negative is:
base + [(base * percent) / 100]
"""
--Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5820 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100316/361fa936/attachment.bin>
More information about the xorg-devel
mailing list