From 405d9a3e431b01a221be65f41bccb6c80c43b0a4 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Fri, 11 Jan 2008 21:19:58 -0500 Subject: dont reparse the config file when the keyboard map changes. just rebind everything. yay for mika as inspiration --- openbox/keyboard.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'openbox/keyboard.c') 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); -- cgit v1.2.3 From 0be98fee4743c795b06aa23881b82eff5bab3ef6 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Wed, 16 Jan 2008 15:25:08 +0100 Subject: Various fixes for sparse warnings. Define void functions with (void), not (). Add missing includes. Some functions were declared static but defined non-static. Some variables that should be file static were file global but not used in any other file. prop.h defined a new prop_atoms in each file that included it instead of declaring it extern. --- openbox/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'openbox/keyboard.c') diff --git a/openbox/keyboard.c b/openbox/keyboard.c index eddda577..4c570dfb 100644 --- a/openbox/keyboard.c +++ b/openbox/keyboard.c @@ -265,7 +265,7 @@ void keyboard_event(ObClient *client, const XEvent *e) } } -void keyboard_rebind() +void keyboard_rebind(void) { tree_rebind(keyboard_firstnode); grab_keys(TRUE); -- cgit v1.2.3