mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
Touchpad scroll on titlebar
This commit is contained in:
parent
e0a94bee8d
commit
51ff13826b
3 changed files with 28 additions and 1 deletions
|
|
@ -142,3 +142,16 @@ bool sway_set_cloexec(int fd, bool cloexec) {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
float _distance_scrolled = 0;
|
||||
void scroll_distance_add(float delta) {
|
||||
_distance_scrolled += delta;
|
||||
}
|
||||
|
||||
void scroll_distance_reset() {
|
||||
_distance_scrolled = 0;
|
||||
}
|
||||
|
||||
float scroll_distance_get() {
|
||||
return _distance_scrolled;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue