aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-06-29 14:12:54 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-07-03 12:36:33 +0000
commita361d7917b311cad2def1ef42e740670cbddd7b1 (patch)
tree76290bf85ab042bb72df5211631a01aebd8343cb
parentrender: move variables inside #ifdef, as they’re not used outside of it (diff)
main/client: add a version feature flag for cursor-shape
-rw-r--r--client.c3
-rw-r--r--foot-features.h9
-rw-r--r--main.c3
3 files changed, 13 insertions, 2 deletions
diff --git a/client.c b/client.c
index 84bfb2c3..99c7c1e8 100644
--- a/client.c
+++ b/client.c
@@ -67,12 +67,13 @@ version_and_features(void)
{
static char buf[256];
snprintf(buf, sizeof(buf),
- "version: %s %cpgo %cime %cgraphemes %cfractional-scaling %cassertions",
+ "version: %s %cpgo %cime %cgraphemes %cfractional-scaling %ccursor-shape %cassertions",
FOOT_VERSION,
feature_pgo() ? '+' : '-',
feature_ime() ? '+' : '-',
feature_graphemes() ? '+' : '-',
feature_fractional_scaling() ? '+' : ':',
+ feature_cursor_shape() ? '+' : '-',
feature_assertions() ? '+' : '-');
return buf;
}
diff --git a/foot-features.h b/foot-features.h
index 77923aaf..f8043c12 100644
--- a/foot-features.h
+++ b/foot-features.h
@@ -46,3 +46,12 @@ static inline bool feature_fractional_scaling(void)
return false;
#endif
}
+
+static inline bool feature_cursor_shape(void)
+{
+#if defined(HAVE_CURSOR_SHAPE)
+ return true;
+#else
+ return false;
+#endif
+}
diff --git a/main.c b/main.c
index 6dd9e468..fc329574 100644
--- a/main.c
+++ b/main.c
@@ -53,12 +53,13 @@ version_and_features(void)
{
static char buf[256];
snprintf(buf, sizeof(buf),
- "version: %s %cpgo %cime %cgraphemes %cfractional-scaling %cassertions",
+ "version: %s %cpgo %cime %cgraphemes %cfractional-scaling %ccursor-shape %cassertions",
FOOT_VERSION,
feature_pgo() ? '+' : '-',
feature_ime() ? '+' : '-',
feature_graphemes() ? '+' : '-',
feature_fractional_scaling() ? '+' : '-',
+ feature_cursor_shape() ? '+' : '-',
feature_assertions() ? '+' : '-');
return buf;
}