From 01615b24da97bdb5cc4eaec5792da8238dab9942 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 2 Jan 2022 15:13:37 +0800 Subject: [PATCH] Fix mouse wheel scroll direction on pgtk * src/pgtkterm.c (scroll_event): Fix scroll modifiers when `mwheel-coalesce-scroll-events' is nil. --- src/pgtkterm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 74614eae6eb..3093083a82c 100644 --- a/src/pgtkterm.c +++ b/src/pgtkterm.c @@ -6264,9 +6264,9 @@ scroll_event (GtkWidget * widget, GdkEvent * event, gpointer * user_data) ? HORIZ_WHEEL_EVENT : WHEEL_EVENT); inev.ie.modifiers |= (inev.ie.kind == HORIZ_WHEEL_EVENT - ? (delta_x >= 0 ? down_modifier : up_modifier) + ? (delta_x >= 0 ? up_modifier : down_modifier) : (delta_y >= 0 ? down_modifier : up_modifier)); - inev.ie.arg = list3 (Qnil, make_float (delta_x * 100), + inev.ie.arg = list3 (Qnil, make_float (-delta_x * 100), make_float (-delta_y * 100)); } else -- 2.39.2