]> Dogcows Code - chaz/openbox/blobdiff - plugins/keyboard/keyboard.c
dont print bad window errors
[chaz/openbox] / plugins / keyboard / keyboard.c
index f3495eb82f1b6dfc611386d1afe5820d2e28b75f..9b9c0882da295c6d2e1bed453299fafd889b5300 100644 (file)
@@ -7,6 +7,10 @@
 #include "keyboard.h"
 #include <glib.h>
 
+void plugin_setup_config()
+{
+}
+
 KeyBindingTree *firstnode;
 
 static KeyBindingTree *curpos;
@@ -83,7 +87,6 @@ static void press(ObEvent *e, void *foo)
     if (e->data.x.e->xkey.keycode == reset_key &&
         e->data.x.e->xkey.state == reset_state) {
         reset_chains();
-        XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
     } else {
         KeyBindingTree *p;
         if (curpos == NULL)
@@ -98,7 +101,6 @@ static void press(ObEvent *e, void *foo)
                     if (!grabbed) {
                         grab_keyboard(TRUE);
                         grabbed = TRUE;
-                        XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
                     }
                     curpos = p;
                 } else {
@@ -111,7 +113,6 @@ static void press(ObEvent *e, void *foo)
                         p->action->func(&p->action->data);
                     }
 
-                    XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
                     reset_chains();
                 }
                 break;
@@ -119,6 +120,7 @@ static void press(ObEvent *e, void *foo)
             p = p->next_sibling;
         }
     }
+    XAllowEvents(ob_display, AsyncKeyboard, e->data.x.e->xkey.time);
 }
 
 static void binddef()
@@ -165,6 +167,11 @@ static void binddef()
     a = action_new(action_execute);
     a->data.execute.path = g_strdup("xterm");
     kbind(list, a);
+
+    list->data = "C-A-Escape";
+    a = action_new(action_execute);
+    a->data.execute.path = g_strdup("xlock -nolock -mode puzzle");
+    kbind(list, a);
 }
 
 void plugin_startup()
This page took 0.027356 seconds and 4 git commands to generate.