x11: gracefully handle X11 connection error

System Internals / PulseAudio - Igor V. Kovalenko [gmail.com] - 4 January 2021 15:59 UTC

Perform X11 connection recovery via XSetIOErrorExitHandler mechanism.

Implementation is largely inspired by this change to GNOME/mutter https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1447

Part-of:

b6396dbe9 x11: gracefully handle X11 connection error
configure.ac | 12 +++++--
meson.build | 4 +++
src/modules/x11/module-x11-bell.c | 2 ++
src/modules/x11/module-x11-cork-request.c | 2 ++
src/modules/x11/module-x11-publish.c | 2 ++
src/modules/x11/module-x11-xsmp.c | 2 +-
src/pulsecore/x11wrap.c | 59 ++++++++++++++++++++++++++++++-
src/pulsecore/x11wrap.h | 4 +--
8 files changed, 81 insertions(+), 6 deletions(-)

Upstream: cgit.freedesktop.org


  • Share