On 08.11.2014 16:05, Marc Lehmann wrote:
> Hi, it seems this is a bug in the x-server (xkbbell's default bell is
> the same as the core protocol xbell), or pulseaudio - pulseaudio
> shouldn't simply suppress bells (unless the user configures it to do
> so), but presumably play them.
While pulseaudio's x11-bell module disables the bells, it then listens
for its events using the following code:
XkbSelectEvents(pa_x11_wrapper_get_display(u->x11_wrapper),
XkbUseCoreKbd, XkbBellNotifyMask, XkbBellNotifyMask);
So pulseaudio intends to play the bells, but then does not get notified
for direct calls to `XBell`.
XBell looks like this:
int
XBell(
register Display *dpy,
int percent)
{
register xBellReq *req;
LockDisplay(dpy);
GetReq(Bell,req);
req->percent = percent;
UnlockDisplay(dpy);
SyncHandle();
return 1;
}
And XkbBell only uses it as a fallback, not by default:
Bool
XkbBell(Display *dpy, Window window, int percent, Atom name)
{
if ((dpy->flags & XlibDisplayNoXkb) ||
(!dpy->xkb_info && !XkbUseExtension(dpy, NULL, NULL))) {
XBell(dpy, percent);
return False;
}
return XkbDeviceBell(dpy, window, XkbUseCoreKbd,
XkbDfltXIClass, XkbDfltXIId, percent, name);
}
> Trying to patch every x app to work around what is likely a temporary bug
> is not useful, especially as this means urxvt will no longer work with
> other x implementations unless a lot of configury magic is done.
While I agree with you in general, I've found that urxvt is (so far) the
only app which does not work with pulseaudio's method of intercepting the
bell.
The main issue appears to be that pulseaudio disables the audible bell
completely, but then is not getting notified when XBell is called.
Would it be possible for pulseaudio to only disable the default bell on the
beginning of the event and re-enable it afterwards, and prevent the
current bell to be played by X?
Or is there a way for pulseaudio to register itself as the handler for playing
bells?
Thanks,
Daniel.
--
http://daniel.hahler.de/
_______________________________________________
rxvt-unicode mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/rxvt-unicode