]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix mouse wheel scroll direction on pgtk
authorPo Lu <luangruo@yahoo.com>
Sun, 2 Jan 2022 07:13:37 +0000 (15:13 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 2 Jan 2022 07:14:16 +0000 (15:14 +0800)
* src/pgtkterm.c (scroll_event): Fix scroll modifiers when
`mwheel-coalesce-scroll-events' is nil.

src/pgtkterm.c

index 74614eae6eb4cafde13b7d3b7c14414f153b4fd8..3093083a82c84255eb65a212bae5b15236f20e3c 100644 (file)
@@ -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