mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-21 06:36:02 +00:00
Wayland: Fix wheel/touchpad scrolling in opposite direction
Workaround for glfw bug. Fixes #594
This commit is contained in:
parent
bb8e0e7789
commit
af6ff15ee2
1 changed files with 3 additions and 0 deletions
|
|
@ -416,6 +416,9 @@ mouse_event(int button, int modifiers) {
|
|||
|
||||
void
|
||||
scroll_event(double UNUSED xoffset, double yoffset) {
|
||||
// glfw inverts the y-axis when reporting scroll events under wayland
|
||||
// Until this is fixed in upstream, invert y ourselves.
|
||||
if (global_state.is_wayland) yoffset *= -1;
|
||||
int s = (int) round(yoffset * OPT(wheel_scroll_multiplier));
|
||||
if (s == 0) return;
|
||||
bool upwards = s > 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue