Fix horizontal wheel events on Haiku

* src/haikuterm.c (haiku_read_socket): Fix modifier
calculation for horizontal wheel events.
This commit is contained in:
Po Lu 2021-11-21 12:43:53 +00:00
parent 1de6a86553
commit e22c37aa87

View file

@ -3025,7 +3025,10 @@ haiku_read_socket (struct terminal *terminal, struct input_event *hold_quit)
make_float (py));
XSETFRAME (inev.frame_or_window, f);
inev.modifiers |= signbit (py) ? up_modifier : down_modifier;
inev.modifiers |= (signbit (inev.kind == HORIZ_WHEEL_EVENT
? px : py)
? up_modifier
: down_modifier);
py = 0.0f;
px = 0.0f;
}