diff --git a/client.c b/client.c index 48c1de22..24a68d3e 100644 --- a/client.c +++ b/client.c @@ -818,7 +818,7 @@ luaA_client_mouse(lua_State *L) { size_t i, len; int b; - Button *button; + button_t *button; /* arg 2 is modkey table */ luaA_checktable(L, 1); @@ -827,7 +827,7 @@ luaA_client_mouse(lua_State *L) /* arg 4 is cmd to run */ luaA_checkfunction(L, 3); - button = p_new(Button, 1); + button = p_new(button_t, 1); button->button = xutil_button_fromint(b); button->fct = luaL_ref(L, LUA_REGISTRYINDEX); diff --git a/common/xutil.h b/common/xutil.h index 1e7e6eec..93a9a0c1 100644 --- a/common/xutil.h +++ b/common/xutil.h @@ -39,7 +39,7 @@ #define CURSOR_SIZING 120 #define ANY_KEY 0L /* special Key Code, passed to GrabKey */ -#define ANY_MODIFIER (1<<15) /* used in GrabButton, GrabKey */ +#define ANY_MODIFIER (1<<15) /* used in Grabbutton_t, GrabKey */ /***************************************************************** * ERROR CODES diff --git a/event.c b/event.c index 672500e2..03dbd69b 100644 --- a/event.c +++ b/event.c @@ -50,9 +50,9 @@ extern AwesomeConf globalconf; static void event_handle_mouse_button_press(unsigned int button, unsigned int state, - Button *buttons) + button_t *buttons) { - Button *b; + button_t *b; for(b = buttons; b; b = b->next) if(button == b->button && CLEANMASK(state) == b->mod && b->fct) diff --git a/lua.c b/lua.c index 688e8c60..727afaca 100644 --- a/lua.c +++ b/lua.c @@ -59,7 +59,7 @@ luaA_mouse(lua_State *L) { size_t i, len; int b; - Button *button; + button_t *button; /* arg 1 is modkey table */ luaA_checktable(L, 1); @@ -68,7 +68,7 @@ luaA_mouse(lua_State *L) /* arg 3 is cmd to run */ luaA_checkfunction(L, 3); - button = p_new(Button, 1); + button = p_new(button_t, 1); button->button = xutil_button_fromint(b); button->fct = luaL_ref(L, LUA_REGISTRYINDEX); diff --git a/structs.h b/structs.h index e833038e..a2fb831f 100644 --- a/structs.h +++ b/structs.h @@ -94,8 +94,8 @@ struct keybinding_t DO_SLIST(keybinding_t, keybinding, p_delete) /** Mouse buttons bindings */ -typedef struct Button Button; -struct Button +typedef struct button_t button_t; +struct button_t { /** Key modifiers */ unsigned long mod; @@ -104,10 +104,10 @@ struct Button /** Lua function to execute. */ luaA_function fct; /** Next and previous buttons */ - Button *prev, *next; + button_t *prev, *next; }; -DO_SLIST(Button, button, p_delete) +DO_SLIST(button_t, button, p_delete) /** Widget tell status code */ typedef enum @@ -141,8 +141,8 @@ struct widget_t alignment_t align; /** Misc private data */ void *data; - /** Buttons bindings */ - Button *buttons; + /** Button bindings */ + button_t *buttons; /** Cache flags */ int cache_flags; }; @@ -359,9 +359,9 @@ struct AwesomeConf /** Mouse bindings list */ struct { - Button *root; - Button *client; - Button *titlebar; + button_t *root; + button_t *client; + button_t *titlebar; } buttons; /** Numlock mask */ unsigned int numlockmask; diff --git a/titlebar.c b/titlebar.c index 1421e67d..de2084a6 100644 --- a/titlebar.c +++ b/titlebar.c @@ -437,7 +437,7 @@ luaA_titlebar_mouse(lua_State *L) { size_t i, len; int b; - Button *button; + button_t *button; /* arg 1 is modkey table */ luaA_checktable(L, 1); @@ -446,7 +446,7 @@ luaA_titlebar_mouse(lua_State *L) /* arg 3 is cmd to run */ luaA_checkfunction(L, 3); - button = p_new(Button, 1); + button = p_new(button_t, 1); button->button = xutil_button_fromint(b); button->fct = luaL_ref(L, LUA_REGISTRYINDEX); diff --git a/widget.c b/widget.c index 38faeadb..69aaa203 100644 --- a/widget.c +++ b/widget.c @@ -78,7 +78,7 @@ widget_common_button_press(widget_node_t *w, statusbar_t *statusbar __attribute__ ((unused)), xcb_button_press_event_t *ev) { - Button *b; + button_t *b; for(b = w->widget->buttons; b; b = b->next) if(ev->detail == b->button && CLEANMASK(ev->state) == b->mod && b->fct) @@ -194,7 +194,7 @@ luaA_widget_mouse(lua_State *L) /* arg 1 is object */ widget_t **widget = luaL_checkudata(L, 1, "widget"); int b; - Button *button; + button_t *button; /* arg 2 is modkey table */ luaA_checktable(L, 2); @@ -203,7 +203,7 @@ luaA_widget_mouse(lua_State *L) /* arg 4 is cmd to run */ luaA_checkfunction(L, 4); - button = p_new(Button, 1); + button = p_new(button_t, 1); button->button = xutil_button_fromint(b); button->fct = luaL_ref(L, LUA_REGISTRYINDEX); diff --git a/widgets/taglist.c b/widgets/taglist.c index e58236b7..0563b76a 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -192,7 +192,7 @@ taglist_button_press(widget_node_t *w, statusbar_t *statusbar, xcb_button_press_event_t *ev) { VirtScreen *vscreen = &globalconf.screens[statusbar->screen]; - Button *b; + button_t *b; taglist_data_t *data = w->widget->data; taglist_drawn_area_t *tda; area_t *area; diff --git a/widgets/tasklist.c b/widgets/tasklist.c index 549e9467..ce003ab8 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -177,7 +177,7 @@ static void tasklist_button_press(widget_node_t *w, statusbar_t *statusbar, xcb_button_press_event_t *ev) { - Button *b; + button_t *b; client_t *c, **lc; Data *d = w->widget->data; int n = 0, box_width = 0, i, ci = 0; diff --git a/window.c b/window.c index 12d1e264..0f5fdb9b 100644 --- a/window.c +++ b/window.c @@ -112,7 +112,7 @@ window_configure(xcb_window_t win, area_t geometry, int border) void window_grabbuttons(xcb_window_t win, int phys_screen) { - Button *b; + button_t *b; /* Always grab the first mouse button. */ xcb_grab_button(globalconf.connection, false, win, BUTTONMASK, @@ -155,7 +155,7 @@ window_grabbuttons(xcb_window_t win, int phys_screen) void window_root_grabbuttons(void) { - Button *b; + button_t *b; xcb_screen_t *s; int phys_screen = globalconf.default_screen; @@ -186,7 +186,7 @@ window_root_grabbuttons(void) * \param b The button binding. */ void -window_root_grabbutton(Button *b) +window_root_grabbutton(button_t *b) { xcb_screen_t *s; int phys_screen = globalconf.default_screen; diff --git a/window.h b/window.h index 5e19ec84..f95aeeca 100644 --- a/window.h +++ b/window.h @@ -28,7 +28,7 @@ void window_setstate(xcb_window_t, long); long window_getstate(xcb_window_t); void window_configure(xcb_window_t, area_t, int); void window_grabbuttons(xcb_window_t, int); -void window_root_grabbutton(Button *); +void window_root_grabbutton(button_t *); void window_root_grabbuttons(void); void window_root_grabkey(keybinding_t *); void window_setshape(xcb_window_t, int);