X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=535e9f14d3ad98cf1ba5ecec88750ca506197f5f;hb=3b0f41dc66da86aaad4f0343bbfb632c7bbfd0c7;hp=025f1188fa2006fb23cad079c777b0b58f76ccd9;hpb=299687110d478a4928932f72031c345b27a01840;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 025f1188..535e9f14 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -270,7 +270,8 @@ static void event_hack_mods(XEvent *e) magic. Our X core protocol stuff won't work, so we use this to find what the modifier state is instead. */ if (XkbGetState(ob_display, XkbUseCoreKbd, &xkb_state) == Success) - e->xkey.state = xkb_state.compat_state; + e->xkey.state = + modkeys_only_modifier_masks(xkb_state.compat_state); else #endif { @@ -1927,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) @@ -1947,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)