aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-08-31 09:44:13 +0800
committerPo Lu2022-08-31 09:44:13 +0800
commit5bedef8f87d2103e21342a06c4c1c9d7efe06621 (patch)
treeab80d710ef6dd6dbdb6ad79df7496bf89c38e079 /src
parenta28ede3a61a70cf83dfcba6c9d314fbb051a3a94 (diff)
downloademacs-5bedef8f87d2103e21342a06c4c1c9d7efe06621.tar.gz
emacs-5bedef8f87d2103e21342a06c4c1c9d7efe06621.zip
Fix bug#57476
* src/xterm.c (handle_one_xevent): Don't reset valuators on certain crossing events, for the benefit of xfwm4. (bug#57476)
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c31
1 files changed, 28 insertions, 3 deletions
diff --git a/src/xterm.c b/src/xterm.c
index e0a8e13b24e..3c05bc7807d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -20771,8 +20771,20 @@ handle_one_xevent (struct x_display_info *dpyinfo,
20771 any = x_any_window_to_frame (dpyinfo, enter->event); 20771 any = x_any_window_to_frame (dpyinfo, enter->event);
20772 20772
20773#ifdef HAVE_XINPUT2_1 20773#ifdef HAVE_XINPUT2_1
20774 xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid, 20774 /* xfwm4 selects for button events on the frame window,
20775 true); 20775 resulting in passive grabs being generated along with
20776 the delivery of emulated button events; this then
20777 interferes with scrolling, since device valuators
20778 will constantly be reset as the crossing events
20779 related to those grabs arrive. The only way to
20780 remedy this is to never reset scroll valuators on a
20781 grab-related crossing event. (bug#57476) */
20782 if (enter->mode != XINotifyUngrab
20783 && enter->mode != XINotifyGrab
20784 && enter->mode != XINotifyPassiveGrab
20785 && enter->mode != XINotifyPassiveUngrab)
20786 xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid,
20787 true);
20776#endif 20788#endif
20777 20789
20778 { 20790 {
@@ -20888,7 +20900,20 @@ handle_one_xevent (struct x_display_info *dpyinfo,
20888 moves out of a frame (and not into one of its 20900 moves out of a frame (and not into one of its
20889 children, which we know about). */ 20901 children, which we know about). */
20890#ifdef HAVE_XINPUT2_1 20902#ifdef HAVE_XINPUT2_1
20891 if (leave->detail != XINotifyInferior && any) 20903 if (leave->detail != XINotifyInferior && any
20904 /* xfwm4 selects for button events on the frame
20905 window, resulting in passive grabs being
20906 generated along with the delivery of emulated
20907 button events; this then interferes with
20908 scrolling, since device valuators will constantly
20909 be reset as the crossing events related to those
20910 grabs arrive. The only way to remedy this is to
20911 never reset scroll valuators on a grab-related
20912 crossing event. (bug#57476) */
20913 && leave->mode != XINotifyUngrab
20914 && leave->mode != XINotifyGrab
20915 && leave->mode != XINotifyPassiveUngrab
20916 && leave->mode != XINotifyPassiveGrab)
20892 xi_reset_scroll_valuators_for_device_id (dpyinfo, 20917 xi_reset_scroll_valuators_for_device_id (dpyinfo,
20893 leave->deviceid, false); 20918 leave->deviceid, false);
20894#endif 20919#endif