os_wayland: transform pointer events by scale

Fixes #37
This commit is contained in:
Drew DeVault
2019-09-18 12:37:38 -04:00
committed by Elias Naur
parent c5a6ca2aba
commit dcddd9a84a
+4 -1
View File
@@ -1032,7 +1032,10 @@ func (w *window) flushScroll() {
func (w *window) onPointerMotion(x, y C.wl_fixed_t, t C.uint32_t) {
w.flushScroll()
w.lastPos = f32.Point{X: fromFixed(x), Y: fromFixed(y)}
w.lastPos = f32.Point{
X: fromFixed(x) * float32(w.scale),
Y: fromFixed(y) * float32(w.scale),
}
w.w.event(pointer.Event{
Type: pointer.Move,
Position: w.lastPos,