From c3a440e520d661e0296a7ac2d97abc5e9cd65712 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 30 Nov 2021 19:35:36 +0800 Subject: [PATCH] Calculate pixel deltas correctly * src/pgtkterm.c (scroll_event): Fix scroll delta factor. (bug#52195) --- src/pgtkterm.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 98143585cf9..0e98c8a587b 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -6034,8 +6034,8 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) inev.ie.kind = WHEEL_EVENT; inev.ie.modifiers |= down_modifier; inev.ie.arg = list3 (make_fixnum (nlines), - make_float (-dpyinfo->scroll.acc_x * 10), - make_float (-dpyinfo->scroll.acc_y * 10)); + make_float (-dpyinfo->scroll.acc_x * 100), + make_float (-dpyinfo->scroll.acc_y * 100)); if (!x_coalesce_scroll_events) { dpyinfo->scroll.acc_y = 0; @@ -6053,8 +6053,8 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) inev.ie.kind = WHEEL_EVENT; inev.ie.modifiers |= up_modifier; inev.ie.arg = list3 (make_fixnum (nlines), - make_float (-dpyinfo->scroll.acc_x * 10), - make_float (-dpyinfo->scroll.acc_y * 10)); + make_float (-dpyinfo->scroll.acc_x * 100), + make_float (-dpyinfo->scroll.acc_y * 100)); if (!x_coalesce_scroll_events) { @@ -6071,8 +6071,8 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) inev.ie.kind = HORIZ_WHEEL_EVENT; inev.ie.modifiers |= up_modifier; inev.ie.arg = list3 (make_fixnum (nchars), - make_float (-dpyinfo->scroll.acc_x * 10), - make_float (-dpyinfo->scroll.acc_y * 10)); + make_float (-dpyinfo->scroll.acc_x * 100), + make_float (-dpyinfo->scroll.acc_y * 100)); if (x_coalesce_scroll_events) dpyinfo->scroll.acc_x -= dpyinfo->scroll.x_per_char * nchars; @@ -6088,8 +6088,8 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) inev.ie.kind = HORIZ_WHEEL_EVENT; inev.ie.modifiers |= down_modifier; inev.ie.arg = list3 (make_fixnum (nchars), - make_float (-dpyinfo->scroll.acc_x * 10), - make_float (-dpyinfo->scroll.acc_y * 10)); + make_float (-dpyinfo->scroll.acc_x * 100), + make_float (-dpyinfo->scroll.acc_y * 100)); if (x_coalesce_scroll_events) dpyinfo->scroll.acc_x -= -dpyinfo->scroll.x_per_char * nchars; -- 2.39.5