mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 15:45:38 +00:00
ui/app: (wayland) restore discrete scrolling behaviour
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -1001,10 +1001,6 @@ func (w *window) flushScroll() {
|
||||
dist := float32(w.flinger.Tick(time.Now()))
|
||||
fling = w.flingDir.Mul(dist)
|
||||
}
|
||||
total := w.scroll.Add(fling)
|
||||
if total == (f32.Point{}) {
|
||||
return
|
||||
}
|
||||
// The Wayland reported scroll distance for
|
||||
// discrete scroll axis is only 10 pixels, where
|
||||
// 100 seems more appropriate.
|
||||
@@ -1015,6 +1011,10 @@ func (w *window) flushScroll() {
|
||||
if w.discScroll.Y != 0 {
|
||||
w.scroll.Y *= discreteScale
|
||||
}
|
||||
total := w.scroll.Add(fling)
|
||||
if total == (f32.Point{}) {
|
||||
return
|
||||
}
|
||||
w.w.event(pointer.Event{
|
||||
Type: pointer.Move,
|
||||
Source: pointer.Mouse,
|
||||
|
||||
Reference in New Issue
Block a user