diff options
author | Martin Dørum <martid0311@gmail.com> | 2020-04-23 23:07:04 +0200 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2020-04-28 21:46:37 +0200 |
commit | 4492e493e62d51e6cd3340af622eef934f1c88cd (patch) | |
tree | b57fb5901caae42fb167438985a471af2556b04b /include/swaybar | |
parent | Add each view's shell to JSON description (diff) | |
download | sway-4492e493e62d51e6cd3340af622eef934f1c88cd.tar.gz sway-4492e493e62d51e6cd3340af622eef934f1c88cd.tar.zst sway-4492e493e62d51e6cd3340af622eef934f1c88cd.zip |
swaybar: Fix scrolling with precise trackpads
Diffstat (limited to 'include/swaybar')
-rw-r--r-- | include/swaybar/input.h | 11 |
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 @@ | |||
2 | #define _SWAYBAR_INPUT_H | 2 | #define _SWAYBAR_INPUT_H |
3 | 3 | ||
4 | #include <wayland-client.h> | 4 | #include <wayland-client.h> |
5 | #include <stdbool.h> | ||
5 | #include "list.h" | 6 | #include "list.h" |
6 | 7 | ||
7 | #define SWAY_SCROLL_UP KEY_MAX + 1 | 8 | #define SWAY_SCROLL_UP KEY_MAX + 1 |
@@ -9,6 +10,9 @@ | |||
9 | #define SWAY_SCROLL_LEFT KEY_MAX + 3 | 10 | #define SWAY_SCROLL_LEFT KEY_MAX + 3 |
10 | #define SWAY_SCROLL_RIGHT KEY_MAX + 4 | 11 | #define SWAY_SCROLL_RIGHT KEY_MAX + 4 |
11 | 12 | ||
13 | #define SWAY_CONTINUOUS_SCROLL_TIMEOUT 1000 | ||
14 | #define SWAY_CONTINUOUS_SCROLL_THRESHOLD 10000 | ||
15 | |||
12 | struct swaybar; | 16 | struct swaybar; |
13 | struct swaybar_output; | 17 | struct swaybar_output; |
14 | 18 | ||
@@ -50,6 +54,12 @@ struct swaybar_hotspot { | |||
50 | void *data; | 54 | void *data; |
51 | }; | 55 | }; |
52 | 56 | ||
57 | struct swaybar_scroll_axis { | ||
58 | wl_fixed_t value; | ||
59 | uint32_t discrete_steps; | ||
60 | uint32_t update_time; | ||
61 | }; | ||
62 | |||
53 | struct swaybar_seat { | 63 | struct swaybar_seat { |
54 | struct swaybar *bar; | 64 | struct swaybar *bar; |
55 | uint32_t wl_name; | 65 | uint32_t wl_name; |
@@ -57,6 +67,7 @@ struct swaybar_seat { | |||
57 | struct swaybar_pointer pointer; | 67 | struct swaybar_pointer pointer; |
58 | struct swaybar_touch touch; | 68 | struct swaybar_touch touch; |
59 | struct wl_list link; // swaybar_seat:link | 69 | struct wl_list link; // swaybar_seat:link |
70 | struct swaybar_scroll_axis axis[2]; | ||
60 | }; | 71 | }; |
61 | 72 | ||
62 | extern const struct wl_seat_listener seat_listener; | 73 | extern const struct wl_seat_listener seat_listener; |