diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-01-11 21:19:58 -0500 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-01-11 21:19:58 -0500 |
| commit | 405d9a3e431b01a221be65f41bccb6c80c43b0a4 (patch) | |
| tree | 753ee1e167be50ba6d9d26cecf52bd47a737e29d /openbox/keyboard.c | |
| parent | c2e495c720d93521bdb0e1bfd7e76584a1b329b7 (diff) | |
dont reparse the config file when the keyboard map changes. just rebind everything. yay for mika as inspiration
Diffstat (limited to 'openbox/keyboard.c')
| -rw-r--r-- | openbox/keyboard.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/openbox/keyboard.c b/openbox/keyboard.c index 0aade9ab..eddda577 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -51,8 +51,9 @@ static void grab_keys(gboolean grab) if (grab) { p = curpos ? curpos->first_child : keyboard_firstnode; while (p) { - grab_key(p->key, p->state, RootWindow(ob_display, ob_screen), - GrabModeAsync); + if (p->key) + grab_key(p->key, p->state, RootWindow(ob_display, ob_screen), + GrabModeAsync); p = p->next_sibling; } if (curpos) @@ -264,6 +265,12 @@ void keyboard_event(ObClient *client, const XEvent *e) } } +void keyboard_rebind() +{ + tree_rebind(keyboard_firstnode); + grab_keys(TRUE); +} + void keyboard_startup(gboolean reconfig) { grab_keys(TRUE); |
