+#ifdef HAVE_XINPUT
+ if ((!until_idle_p) && (si->num_xinput_devices > 0) &&
+ (event.x_event.type == si->xinput_DeviceMotionNotify ||
+ event.x_event.type == si->xinput_DeviceButtonPress ||
+ event.x_event.type == si->xinput_DeviceButtonRelease ))
+ {
+
+ dispatch_event (si, &event.x_event);
+ if (si->demoing_p &&
+ (event.x_event.type == si->xinput_DeviceMotionNotify ||
+ event.x_event.type == si->xinput_DeviceButtonRelease) )
+ /* When we're demoing a single hack, mouse motion doesn't
+ cause deactivation. Only clicks and keypresses do. */
+ ;
+ else
+ /* If we're not demoing, then any activity causes deactivation.
+ */
+ goto DONE;
+ }
+ else
+#endif /* HAVE_XINPUT */
+