Dont use wheel_scroll_multiplier when sending scroll events in the main screen

This commit is contained in:
Kovid Goyal 2020-08-28 08:14:49 +05:30
parent 0bff30e954
commit 5029a9ad5a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -685,9 +685,8 @@ scroll_event(double UNUSED xoffset, double yoffset, int flags, int modifiers) {
s = (int)round(pixels) / (int)global_state.callback_os_window->fonts_data->cell_height; s = (int)round(pixels) / (int)global_state.callback_os_window->fonts_data->cell_height;
screen->pending_scroll_pixels = pixels - s * (int) global_state.callback_os_window->fonts_data->cell_height; screen->pending_scroll_pixels = pixels - s * (int) global_state.callback_os_window->fonts_data->cell_height;
} else { } else {
if (screen->linebuf == screen->main_linebuf || !screen->modes.mouse_tracking_mode) { if (!screen->modes.mouse_tracking_mode) {
// Only use wheel_scroll_multiplier if we are scrolling kitty scrollback or in mouse // Dont use multiplier if we are sending events to the application
// tracking mode, where the application is responsible for interpreting scroll events
yoffset *= OPT(wheel_scroll_multiplier); yoffset *= OPT(wheel_scroll_multiplier);
} else if (OPT(wheel_scroll_multiplier) < 0) { } else if (OPT(wheel_scroll_multiplier) < 0) {
// ensure that changing scroll direction still works, even though // ensure that changing scroll direction still works, even though