ui/app: (wayland) restore discrete scrolling behaviour

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-09-16 15:39:31 +02:00
parent 37d5b947eb
commit bae2e0ecf2
+4 -4
View File
@@ -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,