This commit is contained in:
David Leppla-Weber 2022-06-27 20:24:26 +09:00 committed by GitHub
commit 68fb2e69c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 28 additions and 1 deletions

View file

@ -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;
}