From 8c99628a716f57eef2c181e30075ff136e76a908 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 24 Dec 2021 09:55:15 +0800 Subject: [PATCH] Fix some more incorrect valuator clearing * src/xterm.c (handle_one_xevent): Improve detection of stray ungrab events. --- src/xterm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; -- 2.39.2