sway/swaybar
Joan Bruguera Micó 9431d0603e swaybar: prioritize workspace scroll over bindsyms
This adds handling for scroll events (e.g. mouse wheel) to the hotspot
callback equivalent to the fallback in `process_discrete_scroll`.

While this may seem redundant (and in many cases, it is), it changes
the priority when the user has Button4/Button5 bindsyms on the bar.

Before this commit:
* Scrolling on unused bar space calls the user's bindsyms.
* Scrolling over the workspaces *still* calls the user's bindsyms.

After this commit:
* Scrolling on unused bar space calls the user's bindsyms.
* Scrolling over the workspaces moves to the previous/next workspace.

If the user has no bindsyms for Button4/Button5, there is no change.

This is consistent with the idea that workspaces are hotspots, and
hotspot event handlers take priority over the user's bindsyms, see
53f9dbd424 ("swaybar: Prioritize hotspot events to bar bindings").

However, note that this strays further away from i3's behaviour.
On i3, user bindsyms take precedence over workspaces, even for Button1.
In fact, it's explicitly documented as such:
https://web.archive.org/web/20240725173949/https://i3wm.org/docs/userguide.html#_mouse_button_commands

Signed-off-by: Joan Bruguera Micó <joanbrugueram@gmail.com>
2024-08-15 18:32:52 +00:00
..
tray Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
bar.c Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
config.c Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
i3bar.c Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
image.c common: move load_image to swaybar 2023-11-23 20:42:04 +01:00
input.c swaybar: prioritize workspace scroll over bindsyms 2024-08-15 18:32:52 +00:00
ipc.c Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
main.c Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
meson.build common: move load_image to swaybar 2023-11-23 20:42:04 +01:00
render.c swaybar: refactor workspace button handling logic 2024-08-15 18:32:49 +00:00
status_line.c Define _POSIX_C_SOURCE globally 2024-02-23 17:43:19 +03:00
swaybar-protocol.7.scd man: update maintainer 2021-01-08 09:33:51 +01:00