From: Po Lu Date: Fri, 27 May 2022 02:34:04 +0000 (+0800) Subject: Fix XI scroll valuator reset on X Toolkit builds X-Git-Tag: emacs-29.0.90~1910^2~402 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=bb0317442b4d62108ca40cc396f5ced467c55f25;p=emacs.git Fix XI scroll valuator reset on X Toolkit builds * src/xterm.c (handle_one_xevent): Reset valuators on XI_Leave if leave->event is an edit widget as well. --- diff --git a/src/xterm.c b/src/xterm.c index 5964a8bb483..4f264ab2a86 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17841,6 +17841,16 @@ handle_one_xevent (struct x_display_info *dpyinfo, masks are set on the frame widget's window. */ f = x_window_to_frame (dpyinfo, leave->event); + /* Also do this again here, since the test for `any' + above may not have found a frame, as that usually + just looks up a top window on Xt builds. */ + +#ifdef HAVE_XINPUT2_1 + if (leave->detail != XINotifyInferior && f) + xi_reset_scroll_valuators_for_device_id (dpyinfo, + leave->deviceid, false); +#endif + if (!f) f = x_top_window_to_frame (dpyinfo, leave->event); #endif