X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fbindings.cc;h=007b03347561a43a79aca40c26abc09e6e4b42eb;hb=660ad41ca0b1c48525bba071a27def141ad1cbfe;hp=d0a06fb032ad019311d1668f4863149483884338;hpb=31e37b3e889daec26784399f6737ec9d8830e366;p=chaz%2Fopenbox diff --git a/src/bindings.cc b/src/bindings.cc index d0a06fb0..007b0334 100644 --- a/src/bindings.cc +++ b/src/bindings.cc @@ -339,7 +339,7 @@ void OBBindings::grabKeys(bool grab) void OBBindings::fireKey(unsigned int modifiers, unsigned int key, Time time) { if (key == _resetkey.key && modifiers == _resetkey.modifiers) { - reset(this); + resetChains(this); } else { KeyBindingTree *p = _curpos->first_child; while (p) { @@ -356,7 +356,7 @@ void OBBindings::fireKey(unsigned int modifiers, unsigned int key, Time time) KeyData *data = new_key_data(win, time, modifiers, key); python_callback(p->callback, (PyObject*)data); Py_DECREF((PyObject*)data); - reset(this); + resetChains(this); } break; } @@ -365,7 +365,7 @@ void OBBindings::fireKey(unsigned int modifiers, unsigned int key, Time time) } } -void OBBindings::reset(OBBindings *self) +void OBBindings::resetChains(OBBindings *self) { self->_timer.stop(); self->grabKeys(false); @@ -435,7 +435,7 @@ void OBBindings::grabButtons(bool grab, OBClient *client) break; case MC_Window: win = client->frame->plate(); - mode = GrabModeSync; // this is handled in the plate's buttonPressHandler + mode = GrabModeSync; // this is handled in fireButton break; default: // any other elements already get button events, don't grab on them @@ -459,6 +459,12 @@ void OBBindings::fireButton(ButtonData *data) { printf("but.mods %d.%d\n", data->button, data->state); + if (data->context == MC_Window) { + // these are grabbed in Sync mode to allow the press to be normal to the + // client + XAllowEvents(otk::OBDisplay::display, ReplayPointer, data->time); + } + ButtonBindingList::iterator it, end = _buttons[data->context].end(); for (it = _buttons[data->context].begin(); it != end; ++it) if ((*it)->binding.key == data->button &&