From a59deef359c5ffa49ea2adb78250f4d4adf94447 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 30 Nov 2021 09:46:25 +0800 Subject: [PATCH] Allow non-float values in x-scroll-event-delta-factor * src/xterm.c (handle_one_xevent): Use XFLOATINT instead of XFLOAT_DATA. --- src/xterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index a6d9c8c7a1b..ed6a31125c9 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10045,8 +10045,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, scroll_unit = pow (FRAME_PIXEL_HEIGHT (f), 2.0 / 3.0); - if (FLOATP (Vx_scroll_event_delta_factor)) - scroll_unit *= XFLOAT_DATA (Vx_scroll_event_delta_factor); + if (NUMBERP (Vx_scroll_event_delta_factor)) + scroll_unit *= XFLOATINT (Vx_scroll_event_delta_factor); if (val->horizontal) { -- 2.39.5