aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2021-11-23 11:08:45 +0800
committerPo Lu2021-11-23 11:08:45 +0800
commit2955d46c00430b38310d0fae968adea91e2bbc3d (patch)
treec512facc13a18a704cf58523e4c97dcd66a52915
parentda3db6a15d1fa20e862ee7b95aeed84ab86dbb05 (diff)
downloademacs-2955d46c00430b38310d0fae968adea91e2bbc3d.tar.gz
emacs-2955d46c00430b38310d0fae968adea91e2bbc3d.zip
Only reset scroll valuators on real enter events
* src/xterm.c (handle_one_xevent): Test event detail and mode before resetting scroll valuators.
-rw-r--r--src/xterm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 11e7e602c09..bbfd3b0e82b 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -9870,7 +9870,12 @@ handle_one_xevent (struct x_display_info *dpyinfo,
9870 9870
9871 x_display_set_last_user_time (dpyinfo, xi_event->time); 9871 x_display_set_last_user_time (dpyinfo, xi_event->time);
9872 x_detect_focus_change (dpyinfo, any, event, &inev.ie); 9872 x_detect_focus_change (dpyinfo, any, event, &inev.ie);
9873 xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid); 9873
9874 if (enter->detail != XINotifyInferior
9875 && enter->mode != XINotifyPassiveUngrab
9876 && enter->mode != XINotifyUngrab && any)
9877 xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid);
9878
9874 f = any; 9879 f = any;
9875 9880
9876 if (f && x_mouse_click_focus_ignore_position) 9881 if (f && x_mouse_click_focus_ignore_position)
@@ -9895,7 +9900,6 @@ handle_one_xevent (struct x_display_info *dpyinfo,
9895 9900
9896 x_display_set_last_user_time (dpyinfo, xi_event->time); 9901 x_display_set_last_user_time (dpyinfo, xi_event->time);
9897 x_detect_focus_change (dpyinfo, any, event, &inev.ie); 9902 x_detect_focus_change (dpyinfo, any, event, &inev.ie);
9898 xi_reset_scroll_valuators_for_device_id (dpyinfo, leave->deviceid);
9899 9903
9900 f = x_top_window_to_frame (dpyinfo, leave->event); 9904 f = x_top_window_to_frame (dpyinfo, leave->event);
9901 if (f) 9905 if (f)