diff -ruN openbox-3.3.1.orig/openbox/action.c openbox-3.3.1/openbox/action.c --- openbox-3.3.1.orig/openbox/action.c 2006-09-07 06:48:40.000000000 -0500 +++ openbox-3.3.1/openbox/action.c 2007-02-27 13:38:23.000000000 -0600 @@ -982,7 +982,7 @@ it won't work right unless we XUngrabKeyboard first, even though we grabbed the key/button Asychronously. e.g. "gnome-panel-control --main-menu" */ - XUngrabKeyboard(ob_display, event_lasttime); + XUngrabKeyboard(ob_display, CurrentTime); } for (it = acts; it; it = g_slist_next(it)) { diff -ruN openbox-3.3.1.orig/openbox/client.c openbox-3.3.1/openbox/client.c --- openbox-3.3.1.orig/openbox/client.c 2006-09-07 06:48:41.000000000 -0500 +++ openbox-3.3.1/openbox/client.c 2007-02-27 13:38:19.000000000 -0600 @@ -2814,7 +2814,7 @@ #799. So now it is RevertToNone again. */ XSetInputFocus(ob_display, self->window, RevertToNone, - event_lasttime); + CurrentTime); } if (self->focus_notify) { @@ -2835,7 +2835,7 @@ #ifdef DEBUG_FOCUS ob_debug("%sively focusing %lx at %d\n", (self->can_focus ? "act" : "pass"), - self->window, (gint) event_lasttime); + self->window, (gint) CurrentTime); #endif /* Cause the FocusIn to come back to us. Important for desktop switches, diff -ruN openbox-3.3.1.orig/openbox/event.c openbox-3.3.1/openbox/event.c --- openbox-3.3.1.orig/openbox/event.c 2006-09-07 06:48:40.000000000 -0500 +++ openbox-3.3.1/openbox/event.c 2007-02-27 13:34:49.000000000 -0600 @@ -221,38 +221,31 @@ static void event_set_lasttime(XEvent *e) { - Time t = 0; - /* grab the lasttime and hack up the state */ switch (e->type) { case ButtonPress: case ButtonRelease: - t = e->xbutton.time; + event_lasttime = e->xbutton.time; break; case KeyPress: - t = e->xkey.time; - break; case KeyRelease: - t = e->xkey.time; + event_lasttime = e->xkey.time; break; case MotionNotify: - t = e->xmotion.time; + event_lasttime = e->xmotion.time; break; case PropertyNotify: - t = e->xproperty.time; + event_lasttime = e->xproperty.time; break; case EnterNotify: case LeaveNotify: - t = e->xcrossing.time; + event_lasttime = e->xcrossing.time; break; default: /* if more event types are anticipated, get their timestamp explicitly */ break; } - - if (t > event_lasttime) - event_lasttime = t; } #define STRIP_MODS(s) \ diff -ruN openbox-3.3.1.orig/openbox/focus.c openbox-3.3.1/openbox/focus.c --- openbox-3.3.1.orig/openbox/focus.c 2006-09-07 06:48:41.000000000 -0500 +++ openbox-3.3.1/openbox/focus.c 2007-02-27 13:37:58.000000000 -0600 @@ -144,7 +144,7 @@ g_free(focus_order); /* reset focus to root */ - XSetInputFocus(ob_display, PointerRoot, RevertToNone, event_lasttime); + XSetInputFocus(ob_display, PointerRoot, RevertToNone, CurrentTime); RrColorFree(color_white); @@ -186,7 +186,7 @@ #endif /* when nothing will be focused, send focus to the backup target */ XSetInputFocus(ob_display, screen_support_win, RevertToNone, - event_lasttime); + CurrentTime); XSync(ob_display, FALSE); } diff -ruN openbox-3.3.1.orig/openbox/grab.c openbox-3.3.1/openbox/grab.c --- openbox-3.3.1.orig/openbox/grab.c 2006-09-07 06:48:40.000000000 -0500 +++ openbox-3.3.1/openbox/grab.c 2007-02-27 13:37:50.000000000 -0600 @@ -54,14 +54,14 @@ if (kgrabs++ == 0) { ret = XGrabKeyboard(ob_display, RootWindow(ob_display, ob_screen), FALSE, GrabModeAsync, GrabModeAsync, - event_lasttime) == Success; + CurrentTime) == Success; if (!ret) --kgrabs; } else ret = TRUE; } else if (kgrabs > 0) { if (--kgrabs == 0) - XUngrabKeyboard(ob_display, event_lasttime); + XUngrabKeyboard(ob_display, CurrentTime); ret = TRUE; } @@ -77,14 +77,14 @@ ret = XGrabPointer(ob_display, screen_support_win, False, GRAB_PTR_MASK, GrabModeAsync, GrabModeAsync, None, - ob_cursor(cur), event_lasttime) == Success; + ob_cursor(cur), CurrentTime) == Success; if (!ret) --pgrabs; } else ret = TRUE; } else if (pgrabs > 0) { if (--pgrabs == 0) { - XUngrabPointer(ob_display, event_lasttime); + XUngrabPointer(ob_display, CurrentTime); } ret = TRUE; } @@ -100,14 +100,14 @@ ret = XGrabPointer(ob_display, win, False, GRAB_PTR_MASK, GrabModeAsync, GrabModeAsync, None, ob_cursor(cur), - event_lasttime) == Success; + CurrentTime) == Success; if (!ret) --pgrabs; } else ret = TRUE; } else if (pgrabs > 0) { if (--pgrabs == 0) { - XUngrabPointer(ob_display, event_lasttime); + XUngrabPointer(ob_display, CurrentTime); } ret = TRUE; } diff -ruN openbox-3.3.1.orig/openbox/mouse.c openbox-3.3.1/openbox/mouse.c --- openbox-3.3.1.orig/openbox/mouse.c 2006-09-07 06:48:41.000000000 -0500 +++ openbox-3.3.1/openbox/mouse.c 2007-02-27 13:37:31.000000000 -0600 @@ -200,7 +200,7 @@ if (CLIENT_CONTEXT(context, client)) { /* Replay the event, so it goes to the client*/ - XAllowEvents(ob_display, ReplayPointer, event_lasttime); + XAllowEvents(ob_display, ReplayPointer, CurrentTime); /* Fall through to the release case! */ } else break;