]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix scroll event test in handle_one_xevent
authorPo Lu <luangruo@yahoo.com>
Sat, 13 Nov 2021 13:37:06 +0000 (21:37 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 13 Nov 2021 13:38:06 +0000 (21:38 +0800)
* src/xterm.c (handle_one_xevent): Test for scroll wheel button
correctly in xwidget code.

src/xterm.c

index 4492db850291943a93839cba1e0fecff68859e63..fd498c0e32bce9033dbcea871aad5642d47a731b 100644 (file)
@@ -9304,10 +9304,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                            event->xbutton.button, event->xbutton.state,
                            event->xbutton.time);
 
-           if (!EQ (selected_window, xvw->w)
-               && ((event->xbutton.button < 3)
-                   || (event->xbutton.button > 7)))
-             {
+            if (!EQ (selected_window, xvw->w) && (event->xbutton.button < 4))
+              {
                inev.ie.kind = SELECT_WINDOW_EVENT;
                inev.ie.frame_or_window = xvw->w;
              }