xorg-x11-server/U_BellProc-Send-bell-event-on-core-protocol-bell-when-requested.patch
Egbert Eich 4fe2418668 - U_BellProc-Send-bell-event-on-core-protocol-bell-when-requested.patch
Send XKB bell event on core protocol bell if such an event is requested.
  This allows to override the system beep by a desktop provided sound
  instead of silently ignore it (bnc#890323).

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=528
2014-08-05 06:23:18 +00:00

40 lines
1.6 KiB
Diff

From: Egbert Eich <eich@freedesktop.org>
Date: Mon Aug 4 19:16:30 2014 +0200
Subject: [PATCH] BellProc: Send bell event on core protocol bell when requested
Patch-mainline: Upstream
Git-commit: e6c8c7e46c79b2837a7d0b12079a47734eff1eb7
Git-repo: git://anongit.freedesktop.org/git/xorg/xserver
References: bnc#890323
Signed-off-by: Egbert Eich <eich@suse.com>
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@freedesktop.org>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
---
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)