mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
seat: support low-resolution clients
When the client doesn't support high-resolution scroll, accumulate deltas until we can notify a discrete event. Some mice have a free spinning wheel, making possible to lock the wheel when the accumulator value is not 0. To avoid synchronization issues between the mouse wheel and the accumulators, store the last delta and when the scroll direction changes, reset the accumulator.
This commit is contained in:
parent
40dc5121aa
commit
add44b3e2e
2 changed files with 59 additions and 2 deletions
|
|
@ -54,6 +54,19 @@ struct wlr_seat_client {
|
|||
// for use by wlr_seat_client_{next_serial,validate_event_serial}
|
||||
struct wlr_serial_ringset serials;
|
||||
bool needs_touch_frame;
|
||||
|
||||
// When the client doesn't support high-resolution scroll, accumulate deltas
|
||||
// until we can notify a discrete event.
|
||||
// Some mice have a free spinning wheel, making possible to lock the wheel
|
||||
// when the accumulator value is not 0. To avoid synchronization issues
|
||||
// between the mouse wheel and the accumulators, store the last delta and
|
||||
// when the scroll direction changes, reset the accumulator.
|
||||
// Indexed by wlr_axis_orientation.
|
||||
struct {
|
||||
int32_t acc_discrete[2];
|
||||
int32_t last_discrete[2];
|
||||
double acc_axis[2];
|
||||
} value120;
|
||||
};
|
||||
|
||||
struct wlr_touch_point {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue