From: Po Lu Date: Sun, 2 Jan 2022 07:13:37 +0000 (+0800) Subject: Fix mouse wheel scroll direction on pgtk X-Git-Tag: emacs-29.0.90~3300 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=01615b24da97bdb5cc4eaec5792da8238dab9942;p=emacs.git Fix mouse wheel scroll direction on pgtk * src/pgtkterm.c (scroll_event): Fix scroll modifiers when `mwheel-coalesce-scroll-events' is nil. --- 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