input/seatop_default: handle continuous scroll events

The implementation is similar to how swaybar handles these events,
except that swaybar does it in a pointer frame event handler.

Fixes #8014
This commit is contained in:
Konstantin Pospelov 2025-04-23 20:06:24 +02:00
parent 0e19d85d37
commit bae4512ec5
3 changed files with 38 additions and 1 deletions

View file

@ -8,6 +8,7 @@
#include "sway/input/seat.h"
#include "config.h"
#define SWAY_CONTINUOUS_SCROLL_TIMEOUT 1000
#define SWAY_CURSOR_PRESSED_BUTTONS_CAP 32
#define SWAY_SCROLL_UP KEY_MAX + 1

View file

@ -80,9 +80,15 @@ struct sway_drag {
struct wl_listener destroy;
};
struct sway_scroll_axis {
double value;
uint32_t time_msec;
};
struct sway_seat {
struct wlr_seat *wlr_seat;
struct sway_cursor *cursor;
struct sway_scroll_axis axis[2];
// Seat scene tree structure
// - scene_tree