From: Po Lu Date: Sat, 13 Nov 2021 12:03:05 +0000 (+0800) Subject: Don't emit SELECT_WINDOW_EVENT when an xwidget is scrolled X-Git-Tag: emacs-29.0.90~2852^2~310 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=102406edb1d387bcb3c82ac320c30da5bd705194;p=emacs.git Don't emit SELECT_WINDOW_EVENT when an xwidget is scrolled * src/xterm.c (handle_one_event): Don't select xwidget window on button event if the button pressed actually represents the scroll wheel. --- diff --git a/src/xterm.c b/src/xterm.c index 172abe919dd..4492db85029 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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;