mirror of
https://codeberg.org/dnkl/yambar.git
synced 2025-06-16 08:15:40 +02:00
config: add bar.trackpad-sensitivity
This is an integer that specifies the amount of scrolling that needs to be accumulated before a wheel-up/down event is emitted. A higher value means you need to drag your fingers a longer distance before the event is emitted. The default is 30.
This commit is contained in:
parent
4ce3fe2285
commit
0aef2f85ee
7 changed files with 20 additions and 1 deletions
|
@ -307,6 +307,8 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
|
|||
|
||||
struct seat *seat = data;
|
||||
struct wayland_backend *backend = seat->backend;
|
||||
struct private *bar = backend->bar->private;
|
||||
|
||||
backend->active_seat = seat;
|
||||
|
||||
if (backend->have_discrete)
|
||||
|
@ -325,7 +327,7 @@ wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
|
|||
? MOUSE_BTN_WHEEL_DOWN
|
||||
: MOUSE_BTN_WHEEL_UP;
|
||||
|
||||
const double step = 20.;
|
||||
const double step = bar->trackpad_sensitivity;
|
||||
const double adjust = backend->aggregated_scroll > 0 ? -step : step;
|
||||
|
||||
while (fabs(backend->aggregated_scroll) >= step) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue