]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix XI scroll valuator reset on X Toolkit builds
authorPo Lu <luangruo@yahoo.com>
Fri, 27 May 2022 02:34:04 +0000 (10:34 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 27 May 2022 02:34:04 +0000 (10:34 +0800)
* src/xterm.c (handle_one_xevent): Reset valuators on XI_Leave
if leave->event is an edit widget as well.

src/xterm.c

index 5964a8bb483144b42aa035253dbe56c14bd6a361..4f264ab2a867aba0695149cf9634df93f5b81446 100644 (file)
@@ -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