]> git.eshelyaron.com Git - emacs.git/commitdiff
Calculate pixel deltas correctly
authorPo Lu <luangruo@yahoo.com>
Tue, 30 Nov 2021 11:35:36 +0000 (19:35 +0800)
committerPo Lu <luangruo@yahoo.com>
Tue, 30 Nov 2021 11:35:36 +0000 (19:35 +0800)
* src/pgtkterm.c (scroll_event): Fix scroll delta
factor. (bug#52195)

src/pgtkterm.c

index 98143585cf9d7f0619ca276c28e8ae7394ed4793..0e98c8a587bf2624f4938f1e3c420c285a1a96c3 100644 (file)
@@ -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;