]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't emit SELECT_WINDOW_EVENT when an xwidget is scrolled
authorPo Lu <luangruo@yahoo.com>
Sat, 13 Nov 2021 12:03:05 +0000 (20:03 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 13 Nov 2021 12:04:47 +0000 (20:04 +0800)
* src/xterm.c (handle_one_event): Don't select xwidget window
on button event if the button pressed actually represents the
scroll wheel.

src/xterm.c

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