summaryrefslogtreecommitdiff
path: root/openbox/keyboard.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-08-12 18:05:40 +0000
committerDana Jansens <danakj@orodu.net>2003-08-12 18:05:40 +0000
commitfdc52e879f11166186014ebb2bac7121edf08e79 (patch)
treec49c8a50579133286e40785ce06cd662fbbc49db /openbox/keyboard.c
parent83705e52c469444de38bb676c097d175e66928a7 (diff)
add the chainQuitKey option to teh <keyboard> section of the rc3
Diffstat (limited to 'openbox/keyboard.c')
-rw-r--r--openbox/keyboard.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/openbox/keyboard.c b/openbox/keyboard.c
index 513b6e1e..0ba7c869 100644
--- a/openbox/keyboard.c
+++ b/openbox/keyboard.c
@@ -8,6 +8,7 @@
#include "action.h"
#include "prop.h"
#include "timer.h"
+#include "config.h"
#include "keytree.h"
#include "keyboard.h"
#include "translate.h"
@@ -36,6 +37,10 @@ static void grab_for_window(Window win, gboolean grab)
grab_key(p->key, p->state, win, GrabModeAsync);
p = p->next_sibling;
}
+ if (curpos)
+ grab_key(config_keyboard_reset_keycode,
+ config_keyboard_reset_state,
+ win, GrabModeAsync);
}
}
@@ -179,6 +184,13 @@ void keyboard_event(ObClient *client, const XEvent *e)
g_assert(e->type == KeyPress);
+ if (e->xkey.keycode == config_keyboard_reset_keycode &&
+ e->xkey.state == config_keyboard_reset_state)
+ {
+ keyboard_reset_chains();
+ return;
+ }
+
if (curpos == NULL)
p = keyboard_firstnode;
else