mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-04-23 04:25:42 +02:00
bar/wayland: fix mouse wheel up not being emitted
We emit mouse wheel up events when the ‘discrete’ counter is negative. Thus, when looping, we need to loop to its *absolute* value.
This commit is contained in:
parent
46e6539b1a
commit
4ce3fe2285
1 changed files with 3 additions and 1 deletions
|
@ -377,7 +377,9 @@ wl_pointer_axis_discrete(void *data, struct wl_pointer *wl_pointer,
|
||||||
? MOUSE_BTN_WHEEL_DOWN
|
? MOUSE_BTN_WHEEL_DOWN
|
||||||
: MOUSE_BTN_WHEEL_UP;
|
: MOUSE_BTN_WHEEL_UP;
|
||||||
|
|
||||||
for (int32_t i = 0; i < discrete; i++) {
|
int count = abs(discrete);
|
||||||
|
|
||||||
|
for (int32_t i = 0; i < count; i++) {
|
||||||
backend->bar_on_mouse(
|
backend->bar_on_mouse(
|
||||||
backend->bar, ON_MOUSE_CLICK, btn,
|
backend->bar, ON_MOUSE_CLICK, btn,
|
||||||
seat->pointer.x, seat->pointer.y);
|
seat->pointer.x, seat->pointer.y);
|
||||||
|
|
Loading…
Add table
Reference in a new issue