diff --git a/config.c b/config.c index c38bd2a89..69647ea3b 100644 --- a/config.c +++ b/config.c @@ -156,7 +156,7 @@ parse_mouse_bindings(cfg_t * cfg, const char *secname, bool handle_arg) static void -set_key_info(Key *key, cfg_t *cfg) +set_key_info(keybinding_t *key, cfg_t *cfg) { unsigned int j; @@ -168,10 +168,9 @@ set_key_info(Key *key, cfg_t *cfg) } static void -config_key_store(Key *key, char *str) +config_key_store(keybinding_t *key, char *str) { xcb_keycode_t kc; - xcb_keysym_t ks; int ikc; if(!a_strlen(str)) @@ -186,21 +185,21 @@ config_key_store(Key *key, char *str) } } -static Key * +static keybinding_t * section_keys(cfg_t *cfg_keys) { - Key *key = NULL, *head = NULL; + keybinding_t *key = NULL, *head = NULL; int i, j, numkeys; cfg_t *cfgkeytmp; for(i = cfg_size(cfg_keys, "key") - 1; i >= 0; i--) { - key = p_new(Key, 1); + key = p_new(keybinding_t, 1); cfgkeytmp = cfg_getnsec(cfg_keys, "key", i); set_key_info(key, cfgkeytmp); config_key_store(key, cfg_getstr(cfgkeytmp, "key")); key->arg = a_strdup(cfg_getstr(cfgkeytmp, "arg")); - key_list_push(&head, key); + keybinding_list_push(&head, key); } for(i = cfg_size(cfg_keys, "keylist") - 1; i >= 0; i--) @@ -215,11 +214,11 @@ section_keys(cfg_t *cfg_keys) for(j = 0; j < numkeys; j++) { - key = p_new(Key, 1); + key = p_new(keybinding_t, 1); set_key_info(key, cfgkeytmp); config_key_store(key, cfg_getnstr(cfgkeytmp, "keylist", j)); key->arg = a_strdup(cfg_getnstr(cfgkeytmp, "arglist", j)); - key_list_push(&head, key); + keybinding_list_push(&head, key); } } diff --git a/config.h b/config.h index 63fe924f8..c53339d24 100644 --- a/config.h +++ b/config.h @@ -24,7 +24,7 @@ #include "structs.h" -DO_SLIST(Key, key, p_delete) +DO_SLIST(keybinding_t, keybinding, p_delete) DO_SLIST(Button, button, p_delete) void config_parse(const char *); diff --git a/event.c b/event.c index 7816afaa2..5ec58385d 100644 --- a/event.c +++ b/event.c @@ -394,7 +394,7 @@ event_handle_keypress(void *data __attribute__ ((unused)), int screen; xcb_query_pointer_reply_t *qpr = NULL; xcb_keysym_t keysym; - Key *k; + keybinding_t *k; /* find the right screen for this event */ for(screen = 0; screen < xcb_setup_roots_length (xcb_get_setup (connection)); screen++) diff --git a/structs.h b/structs.h index 84022f860..8c7b428c1 100644 --- a/structs.h +++ b/structs.h @@ -73,9 +73,9 @@ struct rule_t rule_t *prev, *next; }; -/** Key bindings */ -typedef struct Key Key; -struct Key +/** Keys bindings */ +typedef struct keybinding_t keybinding_t; +struct keybinding_t { unsigned long mod; xcb_keysym_t keysym; @@ -83,7 +83,7 @@ struct Key uicb_t *func; char *arg; /** Next and previous keys */ - Key *prev, *next; + keybinding_t *prev, *next; }; /** Mouse buttons bindings */ @@ -342,7 +342,7 @@ struct AwesomeConf /** Rules list */ rule_t *rules; /** Keys bindings list */ - Key *keys; + keybinding_t *keys; /** Mouse bindings list */ struct { diff --git a/window.c b/window.c index e98053b25..59e7125be 100644 --- a/window.c +++ b/window.c @@ -178,7 +178,7 @@ void window_root_grabkeys(int phys_screen) { xcb_screen_t *s = xcb_aux_get_screen(globalconf.connection, phys_screen); - Key *k; + keybinding_t *k; xcb_keycode_t kc; xcb_ungrab_key(globalconf.connection, ANY_KEY, s->root, ANY_MODIFIER);