diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-07-16 09:09:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-16 09:09:37 -0400 |
commit | e66f813d49e60728064fa563e01f00f7d99e0a08 (patch) | |
tree | 668520fe97250c4274c3749b7ffb870a3063e87f /include/client | |
parent | Fix warning from unused daemon return value (diff) | |
parent | Change workspace when mouse wheel is scrolled while hovering over the bar (diff) | |
download | sway-e66f813d49e60728064fa563e01f00f7d99e0a08.tar.gz sway-e66f813d49e60728064fa563e01f00f7d99e0a08.tar.zst sway-e66f813d49e60728064fa563e01f00f7d99e0a08.zip |
Merge pull request #752 from deklov/bar-scroll-02
Change workspace with mouse wheel
Diffstat (limited to 'include/client')
-rw-r--r-- | include/client/window.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/client/window.h b/include/client/window.h index 55a12225..e07e3509 100644 --- a/include/client/window.h +++ b/include/client/window.h | |||
@@ -27,11 +27,20 @@ struct cursor { | |||
27 | struct wl_poitner *pointer; | 27 | struct wl_poitner *pointer; |
28 | }; | 28 | }; |
29 | 29 | ||
30 | enum scroll_direction { | ||
31 | SCROLL_UP, | ||
32 | SCROLL_DOWN, | ||
33 | SCROLL_LEFT, | ||
34 | SCROLL_RIGHT, | ||
35 | }; | ||
36 | |||
30 | struct pointer_input { | 37 | struct pointer_input { |
31 | int last_x; | 38 | int last_x; |
32 | int last_y; | 39 | int last_y; |
33 | 40 | ||
34 | void (*notify)(struct window *window, int x, int y, uint32_t button); | 41 | void (*notify_button)(struct window *window, int x, int y, uint32_t button); |
42 | |||
43 | void (*notify_scroll)(struct window *window, enum scroll_direction direction); | ||
35 | }; | 44 | }; |
36 | 45 | ||
37 | struct window { | 46 | struct window { |