]> Dogcows Code - chaz/openbox/blobdiff - src/bindings.cc
s/reset/resetChains/
[chaz/openbox] / src / bindings.cc
index d0a06fb032ad019311d1668f4863149483884338..007b03347561a43a79aca40c26abc09e6e4b42eb 100644 (file)
@@ -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 &&
This page took 0.023599 seconds and 4 git commands to generate.