[pulseaudio-tickets] [Bug 58930] X11 bell event dropped in Xfce and other non-Gnome desktops

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Nov 6 18:14:36 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=58930

--- Comment #4 from Daniel Hahler <freedesktop-bugs at thequod.de> ---
I have sent the following patch to the mailing list, which fixes it for me:


> From a9bbcf5f130fcba4420325a7ec0a87ba3ca0e2b8 Mon Sep 17 00:00:00 2001
> From: Daniel Hahler <git at thequod.de>
> Date: Fri, 7 Nov 2014 02:56:43 +0100
> Subject: [PATCH] module-x11-bell: use XkbUseCoreKbd in XkbForceDeviceBell
>  fallback
>
> bne->device is 3, but that caused no beep/bell. Using XkbUseCoreKbd
> fixes it for me.
>
> In case `XkbForceDeviceBell` would return false (which it did not), a
> warning gets logged now.
>
> Ref: https://bugs.freedesktop.org/show_bug.cgi?id=58930
> ---
>  src/modules/x11/module-x11-bell.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/modules/x11/module-x11-bell.c b/src/modules/x11/module-x11-bell.c
> index 001732b..566b0b6 100644
> --- a/src/modules/x11/module-x11-bell.c
> +++ b/src/modules/x11/module-x11-bell.c
> @@ -80,7 +80,9 @@ static int x11_event_cb(pa_x11_wrapper *w, XEvent *e, void *userdata) {
>
>      if (pa_scache_play_item_by_name(u->core, u->scache_item, u->sink_name, ((pa_volume_t) bne->percent*PA_VOLUME_NORM)/100U, NULL, NULL) < 0) {
>          pa_log_info("Ringing bell failed, reverting to X11 device bell.");
> -        XkbForceDeviceBell(pa_x11_wrapper_get_display(w), bne->device, bne->bell_class, bne->bell_id, bne->percent);
> +
> +        if (!XkbForceDeviceBell(pa_x11_wrapper_get_display(w), XkbUseCoreKbd, bne->bell_class, bne->bell_id, bne->percent))
> +            pa_log_warn("Falling back to XkbForceDeviceBell failed!");
>      }
>
>      return 1;
> --
> 2.1.0

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20141107/909114f6/attachment.html>


More information about the pulseaudio-bugs mailing list