if (kgrabs++ == 0) {
g_message("GRABBING KEYBOARD %d", kgrabs);
XGrabKeyboard(ob_display, ob_root, 0, GrabModeAsync, GrabModeSync,
- event_lasttime);
+ CurrentTime);
} else
g_message("NOT GRABBING KEYBOARD %d", kgrabs);
} else if (kgrabs > 0) {
if (grab) {
if (pgrabs++ == 0)
XGrabPointer(ob_display, ob_root, False, 0, GrabModeAsync,
- GrabModeAsync, FALSE, cur, event_lasttime);
+ GrabModeAsync, FALSE, cur, CurrentTime);
} else if (pgrabs > 0) {
if (--pgrabs == 0)
XUngrabPointer(ob_display, CurrentTime);
#include "tree.h"
#include "keyboard.h"
#include "keysrc.h"
+#include "translate.h"
#include <glib.h>
void plugin_setup_config()
if (grabbed) {
grabbed = FALSE;
grab_keyboard(FALSE);
- }
+ } else
+ XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
}
gboolean kbind(GList *keylist, Action *action)
if (!grabbed) {
grab_keyboard(TRUE);
grabbed = TRUE;
+ XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
}
curpos = p;
} else {
p = p->next_sibling;
}
}
- XAllowEvents(ob_display, AsyncKeyboard, e->data.x.e->xkey.time);
}
void plugin_startup()