aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2020-04-23 23:07:04 +0200
committerFurkan Sahin <furkan-dev@proton.me>2020-04-23 23:07:04 +0200
commit33454ed1cde57096fae68c75d95ecd917e830a4f (patch)
treeb57fb5901caae42fb167438985a471af2556b04b /include
parent4a04bcf119f7a4c78d507077e49ed8c12f5e7aa0 (diff)
swaybar: Fix scrolling with precise trackpads
Diffstat (limited to 'include')
-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;