aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-01-17 10:22:23 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-01-17 10:22:23 +0000
commitaeb28e33fa774e9d00ffbc1054c6152ebe54babd (patch)
treeca48264e38111c44f001017d779090cc8c6e9d88
parentAdd support for the new Wayland protocol xdg-system-bell (diff)
features: add +/-system-bell to version output
-rw-r--r--client.c6
-rw-r--r--foot-features.h9
-rw-r--r--main.c3
3 files changed, 15 insertions, 3 deletions
diff --git a/client.c b/client.c
index 8576531f..757f4d41 100644
--- a/client.c
+++ b/client.c
@@ -67,12 +67,14 @@ version_and_features(void)
{
static char buf[256];
snprintf(buf, sizeof(buf),
- "version: %s %cpgo %cime %cgraphemes %cassertions",
+ "version: %s %cpgo %cime %cgraphemes %ctoplevel-icon %csystem-bell %cassertions",
FOOT_VERSION,
feature_pgo() ? '+' : '-',
feature_ime() ? '+' : '-',
feature_graphemes() ? '+' : '-',
- feature_assertions() ? '+' : '-');
+ feature_xdg_toplevel_icon() ? '+' : '-',
+ feature_xdg_system_bell() ? '+' : '-',
+ feature_assertions() ? '+' : '-');
return buf;
}
diff --git a/foot-features.h b/foot-features.h
index 674c1056..0eef5eac 100644
--- a/foot-features.h
+++ b/foot-features.h
@@ -46,3 +46,12 @@ static inline bool feature_xdg_toplevel_icon(void)
return false;
#endif
}
+
+static inline bool feature_xdg_system_bell(void)
+{
+#if defined(HAVE_XDG_SYSTEM_BELL)
+ return true;
+#else
+ return false;
+#endif
+}
diff --git a/main.c b/main.c
index 973cbae4..c5c11080 100644
--- a/main.c
+++ b/main.c
@@ -51,12 +51,13 @@ version_and_features(void)
{
static char buf[256];
snprintf(buf, sizeof(buf),
- "version: %s %cpgo %cime %cgraphemes %ctoplevel-icon %cassertions",
+ "version: %s %cpgo %cime %cgraphemes %ctoplevel-icon %csystem-bell %cassertions",
FOOT_VERSION,
feature_pgo() ? '+' : '-',
feature_ime() ? '+' : '-',
feature_graphemes() ? '+' : '-',
feature_xdg_toplevel_icon() ? '+' : '-',
+ feature_xdg_system_bell() ? '+' : '-',
feature_assertions() ? '+' : '-');
return buf;
}