From 4492e493e62d51e6cd3340af622eef934f1c88cd Mon Sep 17 00:00:00 2001 From: Martin Dørum Date: Thu, 23 Apr 2020 23:07:04 +0200 Subject: swaybar: Fix scrolling with precise trackpads --- include/swaybar/input.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/swaybar/input.h') diff --git a/include/swaybar/input.h b/include/swaybar/input.h index 65e49218..e8735d88 100644 --- a/include/swaybar/input.h +++ b/include/swaybar/input.h @@ -2,6 +2,7 @@ #define _SWAYBAR_INPUT_H #include +#include #include "list.h" #define SWAY_SCROLL_UP KEY_MAX + 1 @@ -9,6 +10,9 @@ #define SWAY_SCROLL_LEFT KEY_MAX + 3 #define SWAY_SCROLL_RIGHT KEY_MAX + 4 +#define SWAY_CONTINUOUS_SCROLL_TIMEOUT 1000 +#define SWAY_CONTINUOUS_SCROLL_THRESHOLD 10000 + struct swaybar; struct swaybar_output; @@ -50,6 +54,12 @@ struct swaybar_hotspot { void *data; }; +struct swaybar_scroll_axis { + wl_fixed_t value; + uint32_t discrete_steps; + uint32_t update_time; +}; + struct swaybar_seat { struct swaybar *bar; uint32_t wl_name; @@ -57,6 +67,7 @@ struct swaybar_seat { struct swaybar_pointer pointer; struct swaybar_touch touch; struct wl_list link; // swaybar_seat:link + struct swaybar_scroll_axis axis[2]; }; extern const struct wl_seat_listener seat_listener; -- cgit v1.2.3