summaryrefslogtreecommitdiff
path: root/openbox/keyboard.c
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2003-09-17 08:11:59 +0000
committerDana Jansens <danakj@orodu.net>2003-09-17 08:11:59 +0000
commitbdc10887cbb7a51c1231978806963e622619e2f9 (patch)
treee48e24240ed0cfcfa205321d20a7c8649941e565 /openbox/keyboard.c
parentebe3091560a859996a9904c342c62b512b39bee0 (diff)
provide a way to remove all bindings
Diffstat (limited to 'openbox/keyboard.c')
-rw-r--r--openbox/keyboard.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/openbox/keyboard.c b/openbox/keyboard.c
index 8786cd2c..54de380c 100644
--- a/openbox/keyboard.c
+++ b/openbox/keyboard.c
@@ -98,6 +98,14 @@ void keyboard_reset_chains()
}
}
+void keyboard_unbind_all()
+{
+ tree_destroy(keyboard_firstnode);
+ keyboard_firstnode = NULL;
+ grab_keys(FALSE);
+ curpos = NULL;
+}
+
gboolean keyboard_bind(GList *keylist, ObAction *action)
{
KeyBindingTree *tree, *t;
@@ -297,16 +305,13 @@ void keyboard_shutdown(gboolean reconfig)
if (!reconfig)
client_remove_destructor(keyboard_interactive_end_client);
- tree_destroy(keyboard_firstnode);
- keyboard_firstnode = NULL;
-
for (it = interactive_states; it; it = g_slist_next(it))
g_free(it->data);
g_slist_free(interactive_states);
interactive_states = NULL;
ob_main_loop_timeout_remove(ob_main_loop, chain_timeout);
- grab_keys(FALSE);
- curpos = NULL;
+
+ keyboard_unbind_all();
}