diff options
author | Simon Ser <contact@emersion.fr> | 2023-03-26 23:27:40 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2024-04-18 10:57:17 +0200 |
commit | 52acbebebc0929a5224d10e5982c5fd33f09e0e6 (patch) | |
tree | a55a495ffa19df4a13fa3d934898f5cb8fcbbb01 | |
parent | build: bump version to 1.8.1 (diff) | |
download | sway-v1.8.tar.gz sway-v1.8.tar.zst sway-v1.8.zip |
ipc: add LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM entryv1.8
This was introduced in the last libinput release.
Fixes the following error:
../sway/ipc-json.c:928:17: error: enumeration value 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM' not handled in switch [-Werror=switch]
928 | switch (libinput_device_config_accel_get_profile(device)) {
| ^~~~~~
-rw-r--r-- | meson.build | 5 | ||||
-rw-r--r-- | sway/ipc-json.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 7185daf1..3d9901a7 100644 --- a/meson.build +++ b/meson.build | |||
@@ -114,6 +114,11 @@ conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd | |||
114 | conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind') | 114 | conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind') |
115 | conf_data.set10('HAVE_BASU', sdbus.found() and sdbus.name() == 'basu') | 115 | conf_data.set10('HAVE_BASU', sdbus.found() and sdbus.name() == 'basu') |
116 | conf_data.set10('HAVE_TRAY', have_tray) | 116 | conf_data.set10('HAVE_TRAY', have_tray) |
117 | conf_data.set10('HAVE_LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', cc.has_header_symbol( | ||
118 | 'libinput.h', | ||
119 | 'LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM', | ||
120 | dependencies: libinput, | ||
121 | )) | ||
117 | 122 | ||
118 | scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages')) | 123 | scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages')) |
119 | if scdoc.found() | 124 | if scdoc.found() |
diff --git a/sway/ipc-json.c b/sway/ipc-json.c index cd79e1c8..61f80cfa 100644 --- a/sway/ipc-json.c +++ b/sway/ipc-json.c | |||
@@ -905,6 +905,11 @@ static json_object *describe_libinput_device(struct libinput_device *device) { | |||
905 | case LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE: | 905 | case LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE: |
906 | accel_profile = "adaptive"; | 906 | accel_profile = "adaptive"; |
907 | break; | 907 | break; |
908 | #if HAVE_LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM | ||
909 | case LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM: | ||
910 | accel_profile = "custom"; | ||
911 | break; | ||
912 | #endif | ||
908 | } | 913 | } |
909 | json_object_object_add(object, "accel_profile", | 914 | json_object_object_add(object, "accel_profile", |
910 | json_object_new_string(accel_profile)); | 915 | json_object_new_string(accel_profile)); |