Fix bug#57476 for Xt builds

* src/xterm.c (handle_one_xevent): Add similar event mode check
to code under USE_X_TOOLKIT conditional.  (bug#57476)
This commit is contained in:
Po Lu 2022-09-01 21:22:17 +08:00
parent 119d59531e
commit 177811ac0c

View file

@ -20951,7 +20951,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
just looks up a top window on Xt builds. */
#ifdef HAVE_XINPUT2_1
if (leave->detail != XINotifyInferior && f)
if (leave->detail != XINotifyInferior && f
&& leave->mode != XINotifyUngrab
&& leave->mode != XINotifyGrab
&& leave->mode != XINotifyPassiveUngrab
&& leave->mode != XINotifyPassiveGrab)
xi_reset_scroll_valuators_for_device_id (dpyinfo,
leave->deviceid, false);
#endif