[PATCH] module-x11-bell: use XkbUseCoreKbd in XkbForceDeviceBell fallback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux