Add support for the new Wayland protocol xdg-system-bell

From the release notes:

    system bell - allowing e.g. terminal emulators to hand off system
    bell alerts to the compositor for among other things accessibility
    purposes

The new protocol is used when the new config option
bell.system=yes (and the compositor implements the protocol,
obviously).

The system bell is rung independent of whether the foot window has
keyboard focus or not (thus relying on compositor configuration to
determine whether anything should be done or not in response to the
bell).

The new option is enabled by default.
This commit is contained in:
Daniel Eklöf 2025-01-17 10:10:10 +01:00
parent 7e7fd0468d
commit 2a07a2e6b9
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
11 changed files with 91 additions and 11 deletions

View file

@ -179,6 +179,15 @@ else
xdg_toplevel_icon = false
endif
if wayland_protocols.version().version_compare('>=1.38')
add_project_arguments('-DHAVE_XDG_SYSTEM_BELL', language: 'c')
wl_proto_xml += [wayland_protocols_datadir / 'staging/xdg-system-bell/xdg-system-bell-v1.xml']
xdg_system_bell = true
else
xdg_system_bell = false
endif
foreach prot : wl_proto_xml
wl_proto_headers += custom_target(
prot.underscorify() + '-client-header',
@ -414,6 +423,7 @@ summary(
'IME': get_option('ime'),
'Grapheme clustering': utf8proc.found(),
'Wayland: xdg-toplevel-icon-v1': xdg_toplevel_icon,
'Wayland: xdg-system-bell-v1': xdg_system_bell,
'utmp backend': utmp_backend,
'utmp helper default path': utmp_default_helper_path,
'Build terminfo': tic.found(),