aboutsummaryrefslogtreecommitdiff
path: root/include/swaybar
diff options
context:
space:
mode:
authorMartin Dørum <martid0311@gmail.com>2020-04-23 23:07:04 +0200
committerDrew DeVault <sir@cmpwn.com>2020-04-28 21:46:37 +0200
commit4492e493e62d51e6cd3340af622eef934f1c88cd (patch)
treeb57fb5901caae42fb167438985a471af2556b04b /include/swaybar
parentf18bcfcd69b514e1387bf37a42be6667a4c19282 (diff)
swaybar: Fix scrolling with precise trackpads
Diffstat (limited to 'include/swaybar')
-rw-r--r--include/swaybar/input.h11
1 files changed, 11 insertions, 0 deletions
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 <wayland-client.h>
+#include <stdbool.h>
#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;