diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-10-25 14:07:44 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-10-25 14:12:26 +0100 |
commit | 19421373b9837860115f1fcf70f160f9d716aee1 (patch) | |
tree | 975380b19e47a6490b3c2a905fed417c754704cc /swaybar/input.c | |
parent | swaybar: fix scrolling behaviour (diff) | |
download | sway-19421373b9837860115f1fcf70f160f9d716aee1.tar.gz sway-19421373b9837860115f1fcf70f160f9d716aee1.tar.zst sway-19421373b9837860115f1fcf70f160f9d716aee1.zip |
swaybar: when scrolling, check that there are workspaces to scroll on
Diffstat (limited to 'swaybar/input.c')
-rw-r--r-- | swaybar/input.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/swaybar/input.c b/swaybar/input.c index 4aefc6d6..263d0253 100644 --- a/swaybar/input.c +++ b/swaybar/input.c | |||
@@ -180,6 +180,10 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer, | |||
180 | return; | 180 | return; |
181 | } | 181 | } |
182 | 182 | ||
183 | if (!sway_assert(!wl_list_empty(&output->workspaces), "axis with no workspaces")) { | ||
184 | return; | ||
185 | } | ||
186 | |||
183 | struct swaybar_workspace *first = | 187 | struct swaybar_workspace *first = |
184 | wl_container_of(output->workspaces.next, first, link); | 188 | wl_container_of(output->workspaces.next, first, link); |
185 | struct swaybar_workspace *last = | 189 | struct swaybar_workspace *last = |