Skip to content

Commit

Permalink
upstream: ipc: add LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM entry
Browse files Browse the repository at this point in the history
  • Loading branch information
WillPower3309 committed May 21, 2023
1 parent 0ca4062 commit 3c2e38b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ 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,
))

scdoc = dependency('scdoc', version: '>=1.9.2', native: true, required: get_option('man-pages'))
if scdoc.found()
Expand Down
5 changes: 5 additions & 0 deletions sway/ipc-json.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,11 @@ static json_object *describe_libinput_device(struct libinput_device *device) {
case LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE:
accel_profile = "adaptive";
break;
#if HAVE_LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM
case LIBINPUT_CONFIG_ACCEL_PROFILE_CUSTOM:
accel_profile = "custom";
break;
#endif
}
json_object_object_add(object, "accel_profile",
json_object_new_string(accel_profile));
Expand Down

0 comments on commit 3c2e38b

Please sign in to comment.