aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2024-11-20 20:41:16 +0100
committerSimon Ser <contact@emersion.fr>2024-11-28 20:40:44 +0100
commit6cdc1315096e847c81702ed37328603c637983a5 (patch)
treeb3a73e46378ef6b32c2b363618ea7ed7e33512c7
parent78750f58a38508802b7ac4781c786a0f1f424cf5 (diff)
ipc-json: handle LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY
New entry introduced in libinput 1.27.0. (cherry picked from commit e2409aa49611bee1e1b99033461bfab0a7550c48)
-rw-r--r--meson.build8
-rw-r--r--sway/ipc-json.c5
2 files changed, 8 insertions, 5 deletions
diff --git a/meson.build b/meson.build
index c3937f9a..1492c620 100644
--- a/meson.build
+++ b/meson.build
@@ -109,11 +109,9 @@ conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd
conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind')
conf_data.set10('HAVE_BASU', sdbus.found() and sdbus.name() == 'basu')
conf_data.set10('HAVE_TRAY', have_tray)
-conf_data.set10('HAVE_LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', cc.has_header_symbol(
- 'libinput.h',
- 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM',
- dependencies: libinput,
-))
+foreach sym : ['LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', 'LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY']
+ conf_data.set10('HAVE_' + sym, cc.has_header_symbol('libinput.h', sym, dependencies: libinput))
+endforeach
scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))
if scdoc.found()
diff --git a/sway/ipc-json.c b/sway/ipc-json.c
index 571338a4..fc1df2ac 100644
--- a/sway/ipc-json.c
+++ b/sway/ipc-json.c
@@ -931,6 +931,11 @@ static json_object *describe_libinput_device(struct libinput_device *device) {
case LIBINPUT_CONFIG_DRAG_LOCK_DISABLED:
drag_lock = "disabled";
break;
+#if HAVE_LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY
+ case LIBINPUT_CONFIG_DRAG_LOCK_ENABLED_STICKY:
+ drag_lock = "enabled_sticky";
+ break;
+#endif
}
json_object_object_add(object, "tap_drag_lock",
json_object_new_string(drag_lock));