]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix some more incorrect valuator clearing
authorPo Lu <luangruo@yahoo.com>
Fri, 24 Dec 2021 01:55:15 +0000 (09:55 +0800)
committerPo Lu <luangruo@yahoo.com>
Fri, 24 Dec 2021 01:55:15 +0000 (09:55 +0800)
* src/xterm.c (handle_one_xevent): Improve detection of stray
ungrab events.

src/xterm.c

index c5f826433f1f261fe2b0c99c4b52235a3edb513b..b8cf637f436550683995f9443375759e2c8beb73 100644 (file)
@@ -10015,7 +10015,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
               been changed elsewhere.  */
            if (enter->detail != XINotifyInferior
                && enter->mode != XINotifyPassiveUngrab
-               && enter->mode != XINotifyUngrab && any)
+               /* See the comment under FocusIn in
+                  `x_detect_focus_change'.  The main relevant culprit
+                  these days seems to be XFCE.  */
+               && enter->mode != XINotifyUngrab
+               && any && enter->event == FRAME_X_WINDOW (any))
              xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid);
 
            f = any;