mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
pipewire: module-x11-bell: mark connection as terminatable
Since XFixes version 6[1] it is possible to mark an X connection as terminatable. The X server will gracefully terminate after a timeout if only terminatable connections remain. [1]: https://gitlab.freedesktop.org/xorg/lib/libxfixes/-/merge_requests/1
This commit is contained in:
parent
c9612225e1
commit
d6c5da5678
4 changed files with 16 additions and 1 deletions
|
|
@ -489,7 +489,7 @@ pipewire_module_x11_bell = shared_library('pipewire-module-x11-bell',
|
|||
install : true,
|
||||
install_dir : modules_install_dir,
|
||||
install_rpath: modules_install_dir,
|
||||
dependencies : [mathlib, dl_lib, rt_lib, pipewire_dep, x11_dep, canberra_dep],
|
||||
dependencies : [mathlib, dl_lib, rt_lib, pipewire_dep, x11_dep, xfixes_dep, canberra_dep],
|
||||
)
|
||||
endif
|
||||
summary({'x11-bell': build_module_x11_bell}, bool_yn: true, section: 'Optional Modules')
|
||||
|
|
|
|||
|
|
@ -38,6 +38,10 @@
|
|||
#include <X11/Xlib-xcb.h>
|
||||
#include <X11/XKBlib.h>
|
||||
|
||||
#ifdef HAVE_XFIXES_6
|
||||
#include <X11/extensions/Xfixes.h>
|
||||
#endif
|
||||
|
||||
#include <canberra.h>
|
||||
|
||||
#include <pipewire/pipewire.h>
|
||||
|
|
@ -190,6 +194,10 @@ static int x11_connect(struct impl *impl, const char *name)
|
|||
XSetIOErrorExitHandler(impl->display, x11_io_error_exit_handler, impl);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XFIXES_6
|
||||
XFixesSetClientDisconnectMode(impl->display, XFixesClientDisconnectFlagTerminate);
|
||||
#endif
|
||||
|
||||
major = XkbMajorVersion;
|
||||
minor = XkbMinorVersion;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue