[PATCH] BellProc: Send bell event on core protocol bell when requested

Peter Hutterer peter.hutterer at who-t.net
Mon Aug 4 21:17:18 PDT 2014


On Mon, Aug 04, 2014 at 07:16:30PM +0200, Egbert Eich wrote:
> XKB allows to override the BellProc() ringing the 'keyboard bell':
> instead an event is sent to an X client which can perform an
> appropriate action.
> In most cases this effectively prevents the core protocol bell
> from ringing: if no BellProc() is set for the device, no attempt
> is made to ring a bell.
> This patch ensures that an XKB bell event is sent also when
> the core protocol bell is rung end thus an appropriate action
> can be taken by a client.
> 
> Signed-off-by: Egbert Eich <eich at freedesktop.org>

Acked-by: Peter Hutterer <peter.hutterer at who-t.net>

Keith, can you merge this directly please? Thanks

Cheers,
   Peter

> ---
>  dix/devices.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dix/devices.c b/dix/devices.c
> index 7f079ff..5d26fae 100644
> --- a/dix/devices.c
> +++ b/dix/devices.c
> @@ -2257,7 +2257,7 @@ ProcBell(ClientPtr client)
>      for (dev = inputInfo.devices; dev; dev = dev->next) {
>          if ((dev == keybd ||
>               (!IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == keybd)) &&
> -            dev->kbdfeed && dev->kbdfeed->BellProc) {
> +            ((dev->kbdfeed && dev->kbdfeed->BellProc) || dev->xkb_interest)) {
>  
>              rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixBellAccess);
>              if (rc != Success)
> -- 
> 1.8.4.5
> 


More information about the xorg-devel mailing list