summaryrefslogtreecommitdiff
path: root/openbox/event.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-31 12:36:06 -0500
committerDana Jansens <danakj@orodu.net>2008-01-31 12:51:38 -0500
commit20b8fcfa33feeade5946bc7f3046705da5d164fe (patch)
tree5199d13a9f18aa90ce51244c3c3eb6685d7673ab /openbox/event.c
parentdc94a241c30484611688a8bfb5515577f017529e (diff)
parentd11ac82062d729be5d63c9c40c5c2bb312a8b8f1 (diff)
Merge branch 'backport' into work
Conflicts: openbox/client.c openbox/config.c openbox/event.c openbox/extensions.c openbox/focus_cycle_indicator.c openbox/focus_cycle_popup.c openbox/menuframe.c openbox/moveresize.c openbox/openbox.c openbox/screen.c openbox/stacking.c openbox/startupnotify.c
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)