From: Po Lu Date: Wed, 12 Jan 2022 01:28:48 +0000 (+0800) Subject: Ignore resetting devices upon some events we don't have to handle X-Git-Tag: emacs-29.0.90~3124 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ee025b7f0ce0ad8555deebc90607e99d645400df;p=emacs.git Ignore resetting devices upon some events we don't have to handle * src/xterm.c (handle_one_xevent): Ignore SlaveSwitch DeviceChanged events. --- diff --git a/src/xterm.c b/src/xterm.c index 52715892703..af0c5c0bfde 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -11167,6 +11167,13 @@ handle_one_xevent (struct x_display_info *dpyinfo, case XI_PropertyEvent: case XI_HierarchyChanged: case XI_DeviceChanged: + +#ifdef XISlaveSwitch + if (xi_event->evtype == XI_DeviceChanged + && (((XIDeviceChangedEvent *) xi_event)->reason + == XISlaveSwitch)) + goto XI_OTHER; +#endif x_init_master_valuators (dpyinfo); goto XI_OTHER; #ifdef XI_TouchBegin