Barnabás Pőcze
afda4c81e7
pipewire: module-x11-bell: simplify x11_connect()
...
Since no cleanup needs to be in `x11_cleanup()`, the
`error` label may be removed and the error codes
can be returned directly.
2022-02-18 12:30:53 +01:00
Barnabás Pőcze
d558e87b51
pipewire: module-x11-bell: remove a function
...
`x11_close()` is no longer needed since X11 errors
are now considered fatal, so `module_destroy()` will
be called if `x11_connect()` fails, which means that
the code from `x11_close()` can be moved there.
2022-02-18 12:30:53 +01:00
Barnabás Pőcze
ffabf78cb7
pipewire: module-x11-bell: check source creation
2022-02-18 12:30:53 +01:00
Barnabás Pőcze
84cc3d7dc6
pipewire: module-x11-bell: make X11 errors fatal
2022-02-18 12:30:53 +01:00
Barnabás Pőcze
7f70d484c2
pipewire: module-x11-bell: only use the thread loop to play the sample
...
Register the X11 file descriptor in the main loop,
and use `pw_loop_invoke()` to offload the libcanberra
calls to the thread loop.
2022-02-18 12:30:50 +01:00
Barnabás Pőcze
0ed27e570f
pipewire: module-x11-bell: only remove hook if registered
...
Only remove the module listener if it has actually
been added to the module's listener list.
2022-02-18 12:22:10 +01:00
Wim Taymans
5c894c2283
modules: handle x11 sample fallback better
2022-01-21 16:47:42 +01:00
Wim Taymans
0cd0ef5912
modules: add x11-bell module
...
It listens for X11 bell events and plays a sample with libcanberra.
Fixes #1668
2022-01-21 16:30:02 +01:00