summaryrefslogtreecommitdiff
path: root/openbox/event.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbox/event.c')
-rw-r--r--openbox/event.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/openbox/event.c b/openbox/event.c
index 8443e08c..9377214b 100644
--- a/openbox/event.c
+++ b/openbox/event.c
@@ -269,7 +269,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(obt_display, XkbUseCoreKbd, &xkb_state) == Success)
- e->xkey.state = xkb_state.compat_state;
+ e->xkey.state =
+ obt_keyboard_only_modmasks(xkb_state.compat_state);
else
#endif
{
@@ -1929,8 +1930,7 @@ void event_halt_focus_delay(void)
gulong event_start_ignore_all_enters(void)
{
- XSync(obt_display, FALSE);
- return LastKnownRequestProcessed(obt_display);
+ return NextRequest(obt_display);
}
static void event_ignore_enter_range(gulong start, gulong end)
@@ -1949,13 +1949,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(obt_display, FALSE);
+ OBT_PROP_ERASE(screen_support_win, MOTIF_WM_HINTS);
}
void event_end_ignore_all_enters(gulong start)
{
- XSync(obt_display, FALSE);
- event_ignore_enter_range(start, LastKnownRequestProcessed(obt_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(obt_display)-1);
}
static gboolean is_enter_focus_event_ignored(XEvent *e)