mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
cursor: prevent hi-res mice triggering scroll actions too often
Hi-res mice produces mulitple scroll events with `delta_discrete` != 0 during a single "click". This patch makes them trigger `Scroll` actions only when the accumulated `delta_discrete` exceeds 120 (= 1 click). See https://lists.freedesktop.org/archives/wayland-devel/2019-April/040377.html for how hi-res scroll events are reported.
This commit is contained in:
parent
1747d9e961
commit
cb79eccea1
2 changed files with 42 additions and 40 deletions
|
|
@ -111,9 +111,10 @@ struct seat {
|
|||
bool cursor_visible;
|
||||
struct wlr_cursor *cursor;
|
||||
struct wlr_xcursor_manager *xcursor_manager;
|
||||
struct {
|
||||
double x, y;
|
||||
} smooth_scroll_offset;
|
||||
struct accumulated_scroll {
|
||||
double delta;
|
||||
double delta_discrete;
|
||||
} accumulated_scrolls[2]; /* indexed by wl_pointer_axis */
|
||||
bool cursor_scroll_wheel_emulation;
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue