]> Dogcows Code - chaz/openbox/blobdiff - plugins/keyboard/keyboard.c
add the keyboard plugin into the build systems
[chaz/openbox] / plugins / keyboard / keyboard.c
index 22ea5556bcb4b2580a2dd739ab32f54b6e667c61..add2b473d665a01e887d08dab78ff33a5c2bf0f7 100644 (file)
@@ -1,16 +1,19 @@
-#include "../../kernel/focus.h"
-#include "../../kernel/dispatch.h"
-#include "../../kernel/openbox.h"
-#include "../../kernel/grab.h"
-#include "../../kernel/action.h"
+#include "kernel/focus.h"
+#include "kernel/dispatch.h"
+#include "kernel/openbox.h"
+#include "kernel/event.h"
+#include "kernel/grab.h"
+#include "kernel/action.h"
+#include "kernel/parse.h"
 #include "tree.h"
 #include "keyboard.h"
-#include "keysrc.h"
+#include "keyparse.h"
 #include "translate.h"
 #include <glib.h>
 
 void plugin_setup_config()
 {
+    parse_reg_section("keyboard", keyparse);
 }
 
 KeyBindingTree *firstnode;
@@ -40,7 +43,7 @@ static void reset_chains()
        grabbed = FALSE;
         grab_keyboard(FALSE);
     } else
-        XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
+        XAllowEvents(ob_display, AsyncKeyboard, event_lasttime);
 }
 
 gboolean kbind(GList *keylist, Action *action)
@@ -102,7 +105,8 @@ static void press(ObEvent *e, void *foo)
                     if (!grabbed) {
                         grab_keyboard(TRUE);
                         grabbed = TRUE;
-                        XAllowEvents(ob_display, AsyncKeyboard, CurrentTime);
+                        XAllowEvents(ob_display, AsyncKeyboard,
+                                     event_lasttime);
                     }
                     curpos = p;
                 } else {
@@ -129,8 +133,6 @@ void plugin_startup()
     dispatch_register(Event_X_KeyPress, (EventHandler)press, NULL);
 
     translate_key("C-g", &reset_state, &reset_key);
-
-    keysrc_parse();
 }
 
 void plugin_shutdown()
This page took 0.025303 seconds and 4 git commands to generate.