diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2018-10-25 14:07:44 +0100 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2018-10-25 14:07:44 +0100 |
| commit | 8a02d3aa0bae667e6e17d3c6962c7371e3e8e58a (patch) | |
| tree | 975380b19e47a6490b3c2a905fed417c754704cc /swaybar | |
| parent | 30df727e763fc3c10b3d6b49c576d933f46dffde (diff) | |
swaybar: when scrolling, check that there are workspaces to scroll on
Diffstat (limited to 'swaybar')
| -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, return; } + if (!sway_assert(!wl_list_empty(&output->workspaces), "axis with no workspaces")) { + return; + } + struct swaybar_workspace *first = wl_container_of(output->workspaces.next, first, link); struct swaybar_workspace *last = |
