mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-08-04 14:46:03 +00:00
A high resolution wheel delivers one physical detent as several VALUE120 events, so pending_scroll_pixels accumulates fractions of a line and carries the remainder to the next event. Detents do not reliably total 120 units, so that carry is load bearing: it is what lets an undersized detent still scroll a line. It breaks down when the scroll direction changes, because the residual then has the wrong sign and the first detent of the new direction is spent cancelling it rather than scrolling. Measured on a Logitech MX Master 3 under GNOME/Wayland, against a terminal program that had requested mouse events, 47% of detents that reversed direction scrolled nothing, against 2% of detents continuing in the same direction. Discard the residual when the direction changes, and leave the carry alone otherwise, so scrolling in a single direction is unaffected. The accumulator state also moves from Screen to OSWindow, since scroll events are delivered to an OS Window rather than to a particular terminal window. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atexit.py | ||
| CascadiaCode-Regular.otf | ||
| check_build.py | ||
| child.py | ||
| clipboard.py | ||
| ComfyCode-Regular.ttf | ||
| command_palette.py | ||
| completion.py | ||
| crypto.py | ||
| datatypes.py | ||
| dnd.py | ||
| dnd_kitten.py | ||
| file_transmission.py | ||
| FiraCode-Medium.otf | ||
| fonts.py | ||
| glfw.py | ||
| gr.py | ||
| GraphemeBreakTest.json | ||
| graphics.py | ||
| iosevka-regular.ttf | ||
| keys.py | ||
| layout.py | ||
| LiberationMono-Regular.ttf | ||
| main.py | ||
| mouse.py | ||
| multicell.py | ||
| notifications.py | ||
| open_actions.py | ||
| options.py | ||
| panels.py | ||
| parser.py | ||
| screen.py | ||
| search_query_parser.py | ||
| shell_integration.py | ||
| shm.py | ||
| ssh.py | ||
| tab_bar.py | ||
| tui.py | ||
| twemoji_smiley-cff2_colr_1.otf | ||
| utmp.py | ||