- /* count the events without disrupting them */
- ignore_enter_focus = 0;
- XCheckIfEvent(ob_display, &e, event_look_for_enters, NULL);
+ ob_debug_type(OB_DEBUG_FOCUS, "ignoring enters from %lu until %lu\n",
+ r->start, r->end);
+
+ /* increment the serial so we don't ignore events we weren't meant to */
+ PROP_ERASE(screen_support_win, motif_wm_hints);
+}
+
+void event_end_ignore_all_enters(gulong start)
+{
+ /* Use (NextRequest-1) so that we ignore up to the current serial only.
+ Inside event_ignore_enter_range, we increment the serial by one, but if
+ we ignore that serial too, then any enter events generated by mouse
+ movement will be ignored until we create some further network traffic.
+ Instead ignore up to NextRequest-1, then when we increment the serial,
+ we will be *past* the range of ignored serials */
+ event_ignore_enter_range(start, NextRequest(ob_display)-1);