X-Git-Url: https://git.brokenzipper.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=535e9f14d3ad98cf1ba5ecec88750ca506197f5f;hb=3a03a554f0d5fc78ae211b5cf7cd162ea524e157;hp=fba5e86d8e7491b98aea4fa3b80c3b62cc9a0abe;hpb=bed3cb7a30e5bc3e75bf624dafc2d7d94714ae2f;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index fba5e86d..535e9f14 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -1928,8 +1928,7 @@ void event_halt_focus_delay(void) gulong event_start_ignore_all_enters(void) { - XSync(ob_display, FALSE); - return LastKnownRequestProcessed(ob_display); + return NextRequest(ob_display); } static void event_ignore_enter_range(gulong start, gulong end) @@ -1948,13 +1947,18 @@ static void event_ignore_enter_range(gulong start, gulong end) r->start, r->end); /* increment the serial so we don't ignore events we weren't meant to */ - XSync(ob_display, FALSE); + PROP_ERASE(screen_support_win, motif_wm_hints); } void event_end_ignore_all_enters(gulong start) { - XSync(ob_display, FALSE); - event_ignore_enter_range(start, LastKnownRequestProcessed(ob_display)); + /* 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); } static gboolean is_enter_focus_event_ignored(XEvent *e)