Scale touchpad input by display scale on wayland
This commit is contained in:
parent
4b4f904aac
commit
d2288d8f83
4
glfw/wl_init.c
vendored
4
glfw/wl_init.c
vendored
@ -336,14 +336,14 @@ static void pointerHandleAxis(void* data UNUSED,
|
|||||||
window->wl.axis_discrete_count.x--;
|
window->wl.axis_discrete_count.x--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
x = -wl_fixed_to_double(value);
|
x = -wl_fixed_to_double(value) * (window->wl.scale);
|
||||||
}
|
}
|
||||||
else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL) {
|
else if (axis == WL_POINTER_AXIS_VERTICAL_SCROLL) {
|
||||||
if (window->wl.axis_discrete_count.y) {
|
if (window->wl.axis_discrete_count.y) {
|
||||||
window->wl.axis_discrete_count.y--;
|
window->wl.axis_discrete_count.y--;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
y = -wl_fixed_to_double(value);
|
y = -wl_fixed_to_double(value) * (window->wl.scale);
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfwInputScroll(window, x, y, 1, _glfw.wl.xkb.states.modifiers);
|
_glfwInputScroll(window, x, y, 1, _glfw.wl.xkb.states.modifiers);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user