emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 2955d46: Only reset scroll valuators on real enter events


From: Po Lu
Subject: master 2955d46: Only reset scroll valuators on real enter events
Date: Mon, 22 Nov 2021 22:09:28 -0500 (EST)

branch: master
commit 2955d46c00430b38310d0fae968adea91e2bbc3d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Only reset scroll valuators on real enter events
    
    * src/xterm.c (handle_one_xevent): Test event detail and mode
    before resetting scroll valuators.
---
 src/xterm.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 11e7e60..bbfd3b0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9870,7 +9870,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
            x_display_set_last_user_time (dpyinfo, xi_event->time);
            x_detect_focus_change (dpyinfo, any, event, &inev.ie);
-           xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid);
+
+           if (enter->detail != XINotifyInferior
+               && enter->mode != XINotifyPassiveUngrab
+               && enter->mode != XINotifyUngrab && any)
+             xi_reset_scroll_valuators_for_device_id (dpyinfo, 
enter->deviceid);
+
            f = any;
 
            if (f && x_mouse_click_focus_ignore_position)
@@ -9895,7 +9900,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
 
            x_display_set_last_user_time (dpyinfo, xi_event->time);
            x_detect_focus_change (dpyinfo, any, event, &inev.ie);
-           xi_reset_scroll_valuators_for_device_id (dpyinfo, leave->deviceid);
 
            f = x_top_window_to_frame (dpyinfo, leave->event);
            if (f)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]