]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix scroll event translation for legacy button events
authorPo Lu <luangruo@yahoo.com>
Sun, 15 May 2022 01:05:41 +0000 (09:05 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 15 May 2022 01:05:59 +0000 (09:05 +0800)
* src/xterm.c (handle_one_xevent): Don't treat emulated Button8
as a wheel event.

src/xterm.c

index c0d2ee40b0f6d1bf7507bfcf59a1d0188c17fd37..dbe07a85513deba9bda604b3c621f2bff3a03115 100644 (file)
@@ -16981,7 +16981,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
            f = x_any_window_to_frame (dpyinfo, event->xbutton.window);
 
            if (event->xbutton.button > 3
-               && event->xbutton.button < 9
+               && event->xbutton.button < 8
                && f)
              {
                if (ignore_next_mouse_click_timeout
@@ -18402,7 +18402,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
                  f = x_any_window_to_frame (dpyinfo, xev->event);
 
-                 if (xev->detail > 3 && xev->detail < 9 && f)
+                 if (xev->detail > 3 && xev->detail < 8 && f)
                    {
                      if (xev->evtype == XI_ButtonRelease)
                        {
@@ -18445,7 +18445,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
              if (f)
                {
-                 if (xev->detail >= 4 && xev->detail <= 8)
+                 if (xev->detail >= 4 && xev->detail < 8)
                    {
                      if (xev->evtype == XI_ButtonRelease)
                        {