From: Po Lu Date: Tue, 30 Nov 2021 11:35:36 +0000 (+0800) Subject: Calculate pixel deltas correctly X-Git-Tag: emacs-29.0.90~3636 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c3a440e520d661e0296a7ac2d97abc5e9cd65712;p=emacs.git Calculate pixel deltas correctly * src/pgtkterm.c (scroll_event): Fix scroll delta factor. (bug#52195) --- 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;