t->callbacks.push_back(callback);
destroytree(tree);
} else {
+ // grab the server here to make sure no key pressed go missed
+ otk::OBDisplay::grab();
grabKeys(false);
// assimilate this built tree into the main tree
assimilate(tree); // assimilation destroys/uses the tree
grabKeys(true);
+ otk::OBDisplay::ungrab();
}
Py_INCREF(callback);
t->callbacks.end(),
callback);
if (it != t->callbacks.end()) {
+ // grab the server here to make sure no key pressed go missed
+ otk::OBDisplay::grab();
grabKeys(false);
_curpos = &_keytree;
Py_XDECREF(*it);
grabKeys(true);
+ otk::OBDisplay::ungrab();
+
return true;
}
}
{
Binding b(0, 0);
if (translate(key, b)) {
+ // grab the server here to make sure no key pressed go missed
+ otk::OBDisplay::grab();
grabKeys(false);
_resetkey.key = b.key;
_resetkey.modifiers = b.modifiers;
grabKeys(true);
+ otk::OBDisplay::ungrab();
}
}
if (p->binding.key == key && p->binding.modifiers == modifiers) {
if (p->chain) {
_timer.start(); // start/restart the timer
+ // grab the server here to make sure no key pressed go missed
+ otk::OBDisplay::grab();
grabKeys(false);
_curpos = p;
grabKeys(true);
+ otk::OBDisplay::ungrab();
} else {
Window win = None;
OBClient *c = Openbox::instance->focusedClient();
void OBBindings::resetChains(OBBindings *self)
{
self->_timer.stop();
+ // grab the server here to make sure no key pressed go missed
+ otk::OBDisplay::grab();
self->grabKeys(false);
self->_curpos = &self->_keytree;
self->grabKeys(true);
+ otk::OBDisplay::ungrab();
}