diff options
author | Jasen Borisov <[email protected]> | 2016-05-01 11:02:44 +0100 |
---|---|---|
committer | Jasen Borisov <[email protected]> | 2016-05-01 11:02:44 +0100 |
commit | de007c9b58fa5fda767196321a72dc9a39609efb (patch) | |
tree | 2e2ac142780cd6689635c6ce37917d6eb39d2007 /sway/config.c | |
parent | 68f0baf3ec3846e4f0ac7cecc12ed5ae9ad68546 (diff) |
Add input cmd for setting pointer accel profile.
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index b3b743c3..69ae7c03 100644 --- a/sway/config.c +++ b/sway/config.c @@ -562,6 +562,9 @@ void merge_input_config(struct input_config *dst, struct input_config *src) { } dst->identifier = strdup(src->identifier); } + if (src->accel_profile != INT_MIN) { + dst->accel_profile = src->accel_profile; + } if (src->click_method != INT_MIN) { dst->click_method = src->click_method; } @@ -735,6 +738,10 @@ void apply_input_config(struct input_config *ic, struct libinput_device *dev) { ic->identifier); } + if (ic && ic->accel_profile != INT_MIN) { + sway_log(L_DEBUG, "apply_input_config(%s) accel_set_profile(%d)", ic->identifier, ic->accel_profile); + libinput_device_config_accel_set_profile(dev, ic->accel_profile); + } if (ic && ic->click_method != INT_MIN) { sway_log(L_DEBUG, "apply_input_config(%s) click_set_method(%d)", ic->identifier, ic->click_method); libinput_device_config_click_set_method(dev, ic->click_method); |