add scroll button option

This commit introduces a scroll_button option, which is intended to be
used with scroll_method. Now user can edit his sway config and add an
scroll_button option to device section.
This commit is contained in:
Robert Kubosz 2018-07-11 22:03:06 +02:00
parent 588abbb128
commit 41b80c28df
No known key found for this signature in database
GPG key ID: 781954F8F9DF3043
7 changed files with 45 additions and 0 deletions

View file

@ -28,6 +28,7 @@ struct input_config *new_input_config(const char* identifier) {
input->accel_profile = INT_MIN;
input->pointer_accel = FLT_MIN;
input->scroll_method = INT_MIN;
input->scroll_button = INT_MIN;
input->left_handed = INT_MIN;
input->repeat_delay = INT_MIN;
input->repeat_rate = INT_MIN;
@ -70,6 +71,9 @@ void merge_input_config(struct input_config *dst, struct input_config *src) {
if (src->scroll_method != INT_MIN) {
dst->scroll_method = src->scroll_method;
}
if (src->scroll_button != INT_MIN) {
dst->scroll_button= src->scroll_button;
}
if (src->send_events != INT_MIN) {
dst->send_events = src->send_events;
}