From: Po Lu Date: Fri, 24 Dec 2021 01:55:15 +0000 (+0800) Subject: Fix some more incorrect valuator clearing X-Git-Tag: emacs-29.0.90~3483 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8c99628a716f57eef2c181e30075ff136e76a908;p=emacs.git Fix some more incorrect valuator clearing * src/xterm.c (handle_one_xevent): Improve detection of stray ungrab events. --- diff --git a/src/xterm.c b/src/xterm.c index c5f826433f1..b8cf637f436 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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;