diff --git a/awesome.c b/awesome.c index 493b7fc9..cb632c19 100644 --- a/awesome.c +++ b/awesome.c @@ -296,7 +296,7 @@ main(int argc, char **argv) fd_set rd; xcb_generic_event_t *ev; struct sockaddr_un *addr; - Client *c; + client_t *c; bool confcheck = false; static struct option long_options[] = { diff --git a/client.c b/client.c index 556d044f..25146a52 100644 --- a/client.c +++ b/client.c @@ -44,12 +44,12 @@ extern AwesomeConf globalconf; /** Load windows properties, restoring client's tag * and floating state before awesome was restarted if any * \todo this may bug if number of tags is != than before - * \param c Client ref + * \param c client ref * \param screen Screen ID * \return true if client had property */ static bool -client_loadprops(Client * c, int screen) +client_loadprops(client_t * c, int screen) { int i, ntags = 0; Tag *tag; @@ -110,7 +110,7 @@ client_isprotodel(xcb_connection_t *c, xcb_window_t win) * \return true or false */ static bool -client_isvisible_anyscreen(Client *c) +client_isvisible_anyscreen(client_t *c) { Tag *tag; int screen; @@ -136,7 +136,7 @@ client_isvisible_anyscreen(Client *c) * \return true or false */ bool -client_isvisible(Client *c, int screen) +client_isvisible(client_t *c, int screen) { Tag *tag; @@ -151,29 +151,29 @@ client_isvisible(Client *c, int screen) return true; return false; } -/** Get a Client by its window - * \param list Client list to look info - * \param w Client window to find +/** Get a client by its window + * \param list client_t list to look info + * \param w client_t window to find * \return client */ -Client * -client_get_bywin(Client *list, xcb_window_t w) +client_t * +client_get_bywin(client_t *list, xcb_window_t w) { - Client *c; + client_t *c; for(c = list; c && c->win != w; c = c->next); return c; } /** Get a client by its name - * \param list Client list + * \param list client_t list * \param name name to search * \return first matching client */ -Client * -client_get_byname(Client *list, char *name) +client_t * +client_get_byname(client_t *list, char *name) { - Client *c; + client_t *c; for(c = list; c; c = c->next) if(strstr(c->name, name)) @@ -186,7 +186,7 @@ client_get_byname(Client *list, char *name) * \param c the client */ void -client_updatetitle(Client *c) +client_updatetitle(client_t *c) { if(!xutil_gettextprop(globalconf.connection, c->win, xutil_intern_atom(globalconf.connection, "_NET_WM_NAME"), @@ -199,7 +199,7 @@ client_updatetitle(Client *c) } static void -client_unfocus(Client *c) +client_unfocus(client_t *c) { if(globalconf.screens[c->screen].opacity_unfocused != -1) window_settrans(c->win, globalconf.screens[c->screen].opacity_unfocused); @@ -216,7 +216,7 @@ client_unfocus(Client *c) * \param c the client */ void -client_ban(Client *c) +client_ban(client_t *c) { if(globalconf.focus->client == c) client_unfocus(c); @@ -233,7 +233,7 @@ client_ban(Client *c) * \return true if a window (even root) has received focus, false otherwise */ bool -client_focus(Client *c, int screen, bool raise) +client_focus(client_t *c, int screen, bool raise) { int phys_screen; @@ -289,10 +289,10 @@ client_focus(Client *c, int screen, bool raise) } void -client_stack(Client *c) +client_stack(client_t *c) { uint32_t config_win_vals[2]; - Client *client; + client_t *client; layer_t layer; config_win_vals[0] = XCB_NONE; @@ -345,7 +345,7 @@ client_stack(Client *c) void client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen) { - Client *c, *t = NULL; + client_t *c, *t = NULL; xcb_window_t trans; bool rettrans, retloadprops; uint32_t config_win_val; @@ -353,7 +353,7 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen) rule_t *rule; xcb_size_hints_t *u_size_hints; - c = p_new(Client, 1); + c = p_new(client_t, 1); c->screen = screen_get_bycoord(globalconf.screens_info, screen, wgeom->x, wgeom->y); @@ -498,7 +498,7 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen) } static area_t -client_geometry_hints(Client *c, area_t geometry) +client_geometry_hints(client_t *c, area_t geometry) { double dx, dy, max, min, ratio; @@ -551,7 +551,7 @@ client_geometry_hints(Client *c, area_t geometry) * \param return true if resize has been done */ bool -client_resize(Client *c, area_t geometry, bool hints) +client_resize(client_t *c, area_t geometry, bool hints) { int new_screen; area_t area; @@ -631,7 +631,7 @@ client_resize(Client *c, area_t geometry, bool hints) } void -client_setfloating(Client *c, bool floating, layer_t layer) +client_setfloating(client_t *c, bool floating, layer_t layer) { if(c->isfloating != floating) { @@ -663,7 +663,7 @@ client_setfloating(Client *c, bool floating, layer_t layer) * \param c client */ void -client_saveprops(Client *c) +client_saveprops(client_t *c) { int i = 0, ntags = 0; char *prop; @@ -691,7 +691,7 @@ client_saveprops(Client *c) } void -client_unban(Client *c) +client_unban(client_t *c) { xcb_map_window(globalconf.connection, c->win); window_setstate(c->win, XCB_WM_NORMAL_STATE); @@ -700,7 +700,7 @@ client_unban(Client *c) } void -client_unmanage(Client *c) +client_unmanage(client_t *c) { Tag *tag; @@ -735,7 +735,7 @@ client_unmanage(Client *c) } void -client_updatewmhints(Client *c) +client_updatewmhints(client_t *c) { xcb_wm_hints_t *wmh = NULL; @@ -756,7 +756,7 @@ client_updatewmhints(Client *c) } xcb_size_hints_t * -client_updatesizehints(Client *c) +client_updatesizehints(client_t *c) { long msize; xcb_size_hints_t *size = NULL; @@ -814,7 +814,7 @@ uicb_client_settrans(int screen __attribute__ ((unused)), char *arg) double delta = 1.0, current_opacity = 100.0; unsigned int current_opacity_raw = 0; int set_prop = 0; - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; xcb_get_property_reply_t *prop_r; if(!sel) @@ -859,11 +859,11 @@ uicb_client_settrans(int screen __attribute__ ((unused)), char *arg) * \param reverse return previous instead of next if true * \return next or previous client */ -static Client * -client_find_visible(Client *sel, bool reverse) +static client_t * +client_find_visible(client_t *sel, bool reverse) { - Client *next; - Client *(*client_iter)(Client **, Client *) = client_list_next_cycle; + client_t *next; + client_t *(*client_iter)(client_t **, client_t *) = client_list_next_cycle; if(!sel) return NULL; @@ -887,7 +887,7 @@ client_find_visible(Client *sel, bool reverse) void uicb_client_swapprev(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused))) { - Client *prev; + client_t *prev; if((prev = client_find_visible(globalconf.focus->client, true))) { @@ -905,7 +905,7 @@ uicb_client_swapprev(int screen __attribute__ ((unused)), char *arg __attribute_ void uicb_client_swapnext(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused))) { - Client *next; + client_t *next; if((next = client_find_visible(globalconf.focus->client, false))) { @@ -928,7 +928,7 @@ uicb_client_moveresize(int screen, char *arg) char x[8], y[8], w[8], h[8]; int nmx, nmy; area_t geometry; - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; xcb_query_pointer_reply_t *xqp; Layout *curlay = layout_get_current(screen); @@ -983,7 +983,7 @@ uicb_client_moveresize(int screen, char *arg) * \param c the client to kill */ void -client_kill(Client *c) +client_kill(client_t *c) { xcb_client_message_event_t ev; @@ -1015,7 +1015,7 @@ client_kill(Client *c) void uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused))) { - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; if(sel) client_kill(sel); @@ -1026,7 +1026,7 @@ uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ (( * \param geometry the geometry to use for maximizing */ static void -client_maximize(Client *c, area_t geometry) +client_maximize(client_t *c, area_t geometry) { if((c->ismax = !c->ismax)) { @@ -1067,7 +1067,7 @@ client_maximize(Client *c, area_t geometry) void uicb_client_togglemax(int screen, char *arg __attribute__ ((unused))) { - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); @@ -1088,7 +1088,7 @@ uicb_client_togglemax(int screen, char *arg __attribute__ ((unused))) void uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused))) { - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); @@ -1111,7 +1111,7 @@ uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused))) void uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused))) { - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); @@ -1133,7 +1133,7 @@ uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused))) void uicb_client_zoom(int screen, char *arg __attribute__ ((unused))) { - Client *c, *sel = globalconf.focus->client; + client_t *c, *sel = globalconf.focus->client; if(!sel) return; @@ -1158,7 +1158,7 @@ uicb_client_zoom(int screen, char *arg __attribute__ ((unused))) void uicb_client_focusnext(int screen, char *arg __attribute__ ((unused))) { - Client *next; + client_t *next; if((next = client_find_visible(globalconf.focus->client, false))) client_focus(next, screen, true); @@ -1172,7 +1172,7 @@ uicb_client_focusnext(int screen, char *arg __attribute__ ((unused))) void uicb_client_focusprev(int screen, char *arg __attribute__ ((unused))) { - Client *prev; + client_t *prev; if((prev = client_find_visible(globalconf.focus->client, true))) client_focus(prev, screen, true); diff --git a/client.h b/client.h index 43462db7..4d594d8a 100644 --- a/client.h +++ b/client.h @@ -26,22 +26,22 @@ #include "structs.h" -bool client_isvisible(Client *, int); -Client * client_get_bywin(Client *, xcb_window_t); -Client * client_get_byname(Client *, char *); -bool client_focus(Client *, int, bool); -void client_stack(Client *); -void client_ban(Client *); -void client_unban(Client *); +bool client_isvisible(client_t *, int); +client_t * client_get_bywin(client_t *, xcb_window_t); +client_t * client_get_byname(client_t *, char *); +bool client_focus(client_t *, int, bool); +void client_stack(client_t *); +void client_ban(client_t *); +void client_unban(client_t *); void client_manage(xcb_window_t, xcb_get_geometry_reply_t *, int); -bool client_resize(Client *, area_t, bool); -void client_unmanage(Client *); -void client_updatewmhints(Client *); -xcb_size_hints_t *client_updatesizehints(Client *); -void client_updatetitle(Client *); -void client_saveprops(Client *); -void client_kill(Client *); -void client_setfloating(Client *, bool, layer_t); +bool client_resize(client_t *, area_t, bool); +void client_unmanage(client_t *); +void client_updatewmhints(client_t *); +xcb_size_hints_t *client_updatesizehints(client_t *); +void client_updatetitle(client_t *); +void client_saveprops(client_t *); +void client_kill(client_t *); +void client_setfloating(client_t *, bool, layer_t); uicb_t uicb_client_kill; uicb_t uicb_client_moveresize; @@ -58,7 +58,7 @@ uicb_t uicb_client_togglefloating; uicb_t uicb_client_togglescratch; uicb_t uicb_client_setscratch; -DO_SLIST(Client, client, p_delete) +DO_SLIST(client_t, client, p_delete) #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/event.c b/event.c index 9b66e1e6..b52dab6b 100644 --- a/event.c +++ b/event.c @@ -77,7 +77,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)), xcb_connection_t *connection, xcb_button_press_event_t *ev) { int screen; - Client *c; + client_t *c; widget_t *widget; statusbar_t *statusbar; xcb_query_pointer_cookie_t qc; @@ -182,7 +182,7 @@ int event_handle_configurerequest(void *data __attribute__ ((unused)), xcb_connection_t *connection, xcb_configure_request_event_t *ev) { - Client *c; + client_t *c; area_t geometry; if((c = client_get_bywin(globalconf.clients, ev->window))) @@ -297,7 +297,7 @@ event_handle_destroynotify(void *data __attribute__ ((unused)), xcb_connection_t *connection __attribute__ ((unused)), xcb_destroy_notify_event_t *ev) { - Client *c; + client_t *c; if((c = client_get_bywin(globalconf.clients, ev->window))) client_unmanage(c); @@ -313,7 +313,7 @@ int event_handle_enternotify(void *data __attribute__ ((unused)), xcb_connection_t *connection, xcb_enter_notify_event_t *ev) { - Client *c; + client_t *c; int screen; if(ev->mode != XCB_NOTIFY_MODE_NORMAL @@ -359,7 +359,7 @@ event_handle_expose(void *data __attribute__ ((unused)), { int screen; statusbar_t *statusbar; - Client *c; + client_t *c; if(!ev->count) { @@ -503,7 +503,7 @@ int event_handle_propertynotify(void *data __attribute__ ((unused)), xcb_connection_t *connection, xcb_property_notify_event_t *ev) { - Client *c; + client_t *c; xcb_window_t trans; if(ev->state == XCB_PROPERTY_DELETE) @@ -538,7 +538,7 @@ int event_handle_unmapnotify(void *data __attribute__ ((unused)), xcb_connection_t *connection, xcb_unmap_notify_event_t *ev) { - Client *c; + client_t *c; /* * event->send_event (Xlib) is quivalent to (ev->response_type & @@ -563,7 +563,7 @@ event_handle_shape(void *data __attribute__ ((unused)), xcb_connection_t *connection __attribute__ ((unused)), xcb_shape_notify_event_t *ev) { - Client *c = client_get_bywin(globalconf.clients, ev->affected_window); + client_t *c = client_get_bywin(globalconf.clients, ev->affected_window); if(c) window_setshape(c->win, c->phys_screen); diff --git a/ewmh.c b/ewmh.c index fcb3d87a..3ddaaf82 100644 --- a/ewmh.c +++ b/ewmh.c @@ -165,7 +165,7 @@ void ewmh_update_net_client_list(int phys_screen) { xcb_window_t *wins; - Client *c; + client_t *c; int n = 0; for(c = globalconf.clients; c; c = c->next) @@ -240,7 +240,7 @@ void ewmh_update_net_active_window(int phys_screen) { xcb_window_t win; - Client *sel = focus_get_current_client(phys_screen); + client_t *sel = focus_get_current_client(phys_screen); win = sel ? sel->win : XCB_NONE; @@ -250,7 +250,7 @@ ewmh_update_net_active_window(int phys_screen) } static void -ewmh_process_state_atom(Client *c, xcb_atom_t state, int set) +ewmh_process_state_atom(client_t *c, xcb_atom_t state, int set) { const uint32_t raise_window_val = XCB_STACK_MODE_ABOVE; @@ -331,7 +331,7 @@ ewmh_process_state_atom(Client *c, xcb_atom_t state, int set) } static void -ewmh_process_window_type_atom(Client *c, xcb_atom_t state) +ewmh_process_window_type_atom(client_t *c, xcb_atom_t state) { if(state == net_wm_window_type_normal) { @@ -353,7 +353,7 @@ ewmh_process_window_type_atom(Client *c, xcb_atom_t state) void ewmh_process_client_message(xcb_client_message_event_t *ev) { - Client *c; + client_t *c; int screen; if(ev->type == net_current_desktop) @@ -383,7 +383,7 @@ ewmh_process_client_message(xcb_client_message_event_t *ev) } void -ewmh_check_client_hints(Client *c) +ewmh_check_client_hints(client_t *c) { xcb_atom_t *state; void *data = NULL; diff --git a/ewmh.h b/ewmh.h index 6cea088d..24b6b543 100644 --- a/ewmh.h +++ b/ewmh.h @@ -39,7 +39,7 @@ void ewmh_update_net_current_desktop(int); void ewmh_update_net_desktop_names(int); void ewmh_update_net_active_window(int); void ewmh_process_client_message(xcb_client_message_event_t *); -void ewmh_check_client_hints(Client *); +void ewmh_check_client_hints(client_t *); NetWMIcon * ewmh_get_window_icon(xcb_window_t); #endif diff --git a/focus.c b/focus.c index 7be594e2..22d611bf 100644 --- a/focus.c +++ b/focus.c @@ -26,7 +26,7 @@ extern AwesomeConf globalconf; static client_node_t * -focus_get_node_by_client(Client *c) +focus_get_node_by_client(client_t *c) { client_node_t *node; @@ -38,7 +38,7 @@ focus_get_node_by_client(Client *c) } void -focus_add_client(Client *c) +focus_add_client(client_t *c) { client_node_t *node; @@ -55,7 +55,7 @@ focus_add_client(Client *c) } void -focus_delete_client(Client *c) +focus_delete_client(client_t *c) { client_node_t *node = focus_get_node_by_client(c); @@ -66,7 +66,7 @@ focus_delete_client(Client *c) } } -static Client * +static client_t * focus_get_latest_client_for_tags(Tag **t, int nindex) { client_node_t *node; @@ -89,11 +89,11 @@ focus_get_latest_client_for_tags(Tag **t, int nindex) return NULL; } -Client * +client_t * focus_get_current_client(int screen) { Tag **curtags = tags_get_current(screen); - Client *sel = focus_get_latest_client_for_tags(curtags, 0); + client_t *sel = focus_get_latest_client_for_tags(curtags, 0); p_delete(&curtags); return sel; @@ -110,7 +110,7 @@ uicb_focus_history(int screen, char *arg) { int i; Tag **curtags; - Client *c; + client_t *c; if(arg) { @@ -135,7 +135,7 @@ uicb_focus_history(int screen, char *arg) void uicb_focus_client_byname(int screen, char *arg) { - Client *c; + client_t *c; Tag **curtags, **tag; if(arg) diff --git a/focus.h b/focus.h index ac16b51a..a8bdb665 100644 --- a/focus.h +++ b/focus.h @@ -24,9 +24,9 @@ #include "structs.h" -void focus_add_client(Client *); -void focus_delete_client(Client *); -Client * focus_get_current_client(int); +void focus_add_client(client_t *); +void focus_delete_client(client_t *); +client_t * focus_get_current_client(int); uicb_t uicb_focus_history; uicb_t uicb_focus_client_byname; diff --git a/layout.c b/layout.c index f0810bc0..0e6468a1 100644 --- a/layout.c +++ b/layout.c @@ -44,7 +44,7 @@ extern AwesomeConf globalconf; static void arrange(int screen) { - Client *c; + client_t *c; Layout *curlay = layout_get_current(screen); int phys_screen = screen_virttophys(screen); xcb_query_pointer_cookie_t qp_c; diff --git a/layouts/fibonacci.c b/layouts/fibonacci.c index b8fd19d0..dcff6fba 100644 --- a/layouts/fibonacci.c +++ b/layouts/fibonacci.c @@ -31,7 +31,7 @@ static void layout_fibonacci(int screen, int shape) { int n = 0, i = 0; - Client *c; + client_t *c; area_t geometry, area; geometry = area = screen_get_area(screen, globalconf.screens[screen].statusbar, diff --git a/layouts/floating.c b/layouts/floating.c index ebabef61..592589b0 100644 --- a/layouts/floating.c +++ b/layouts/floating.c @@ -28,7 +28,7 @@ extern AwesomeConf globalconf; void layout_floating(int screen) { - Client *c; + client_t *c; for(c = globalconf.clients; c; c = c->next) if(client_isvisible(c, screen) && !c->ismax) diff --git a/layouts/max.c b/layouts/max.c index d098f8cd..f00a2679 100644 --- a/layouts/max.c +++ b/layouts/max.c @@ -30,7 +30,7 @@ extern AwesomeConf globalconf; void layout_max(int screen) { - Client *c; + client_t *c; area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); diff --git a/layouts/tile.c b/layouts/tile.c index 99d1d807..4e751af4 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -36,7 +36,7 @@ uicb_tag_setnmaster(int screen, char * arg) { Tag **curtags = tags_get_current(screen); Layout *curlay = curtags[0]->layout; - Client *c; + client_t *c; int n; if(!arg || (curlay->arrange != layout_tile @@ -65,7 +65,7 @@ uicb_tag_setncol(int screen, char * arg) { Tag **curtags = tags_get_current(screen); Layout *curlay = curtags[0]->layout; - Client *c; + client_t *c; int n; if(!arg || (curlay->arrange != layout_tile @@ -134,7 +134,7 @@ _tile(int screen, const position_t position) int n, i, masterwin = 0, otherwin = 0; int real_ncol = 1, win_by_col = 1, current_col = 0; area_t area, geometry = { 0, 0, 0, 0, NULL, NULL }; - Client *c; + client_t *c; Tag **curtags = tags_get_current(screen); area = screen_get_area(screen, diff --git a/mouse.c b/mouse.c index 50874f65..37e83a27 100644 --- a/mouse.c +++ b/mouse.c @@ -95,9 +95,9 @@ mouse_snapclienttogeometry_inside(area_t geometry, area_t snap_geometry, int sna * \return geometry to set to the client */ static area_t -mouse_snapclient(Client *c, area_t geometry) +mouse_snapclient(client_t *c, area_t geometry) { - Client *snapper; + client_t *snapper; int snap = globalconf.screens[c->screen].snap; area_t snapper_geometry; area_t screen_geometry = @@ -197,7 +197,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused))) { int ocx, ocy, newscreen; area_t geometry; - Client *c = globalconf.focus->client, *target; + client_t *c = globalconf.focus->client, *target; Layout *layout = layout_get_current(screen); simple_window_t *sw = NULL; DrawCtx *ctx; @@ -324,7 +324,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused))) int ocx = 0, ocy = 0, n; xcb_generic_event_t *ev = NULL; xcb_motion_notify_event_t *ev_motion = NULL; - Client *c = globalconf.focus->client; + client_t *c = globalconf.focus->client; Tag **curtags = tags_get_current(screen); Layout *layout = curtags[0]->layout; area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL }; diff --git a/placement.c b/placement.c index 54c99ed0..e97f77b6 100644 --- a/placement.c +++ b/placement.c @@ -66,9 +66,9 @@ placement_fix_offscreen(area_t geometry, int screen, int border) * \return new geometry */ area_t -placement_smart(Client *c) +placement_smart(client_t *c) { - Client *client; + client_t *client; area_t newgeometry = { 0, 0, 0, 0, NULL, NULL }; area_t *screen_geometry, *arealist = NULL, *r; bool found = false; @@ -129,7 +129,7 @@ placement_smart(Client *c) } area_t -placement_under_mouse(Client *c) +placement_under_mouse(client_t *c) { xcb_query_pointer_cookie_t qp_c; xcb_query_pointer_reply_t *qp_r; diff --git a/rules.c b/rules.c index 9f087611..5fe0a1fb 100644 --- a/rules.c +++ b/rules.c @@ -53,7 +53,7 @@ tag_match_rule(Tag *t, rule_t *r) } rule_t * -rule_matching_client(Client *c) +rule_matching_client(client_t *c) { rule_t *r; char *prop = NULL, buf[512]; diff --git a/rules.h b/rules.h index f1fcaaff..5bb0187c 100644 --- a/rules.h +++ b/rules.h @@ -28,7 +28,7 @@ regex_t * rules_compile_regex(char *); bool tag_match_rule(Tag *, rule_t *); -rule_t * rule_matching_client(Client *); +rule_t * rule_matching_client(client_t *); DO_SLIST(rule_t, rule, p_delete) diff --git a/screen.c b/screen.c index 8e8254a8..dabee2d6 100644 --- a/screen.c +++ b/screen.c @@ -126,7 +126,7 @@ screen_virttophys(int screen) * y of the new screen */ void -move_client_to_screen(Client *c, int new_screen, bool doresize) +move_client_to_screen(client_t *c, int new_screen, bool doresize) { Tag *tag; int old_screen = c->screen; @@ -268,7 +268,7 @@ void uicb_client_movetoscreen(int screen __attribute__ ((unused)), char *arg) { int new_screen, prev_screen; - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; if(!sel || !globalconf.screens_info->xinerama_is_active) return; diff --git a/screen.h b/screen.h index b7ec8426..c85ef632 100644 --- a/screen.h +++ b/screen.h @@ -27,7 +27,7 @@ area_t screen_get_area(int, statusbar_t *, Padding *); area_t get_display_area(int, statusbar_t *, Padding *); int screen_virttophys(int); -void move_client_to_screen(Client *, int, bool); +void move_client_to_screen(client_t *, int, bool); uicb_t uicb_screen_focus; uicb_t uicb_client_movetoscreen; diff --git a/structs.h b/structs.h index bec46d4a..c8a7d261 100644 --- a/structs.h +++ b/structs.h @@ -181,9 +181,9 @@ struct statusbar_t statusbar_t *prev, *next; }; -/** Client type */ -typedef struct Client Client; -struct Client +/** client_t type */ +typedef struct client_t client_t; +struct client_t { /** Client name */ char name[256]; @@ -213,7 +213,7 @@ struct Client /** true if the client must be skipped from task bar client list */ bool skiptb; /** Next and previous clients */ - Client *prev, *next; + client_t *prev, *next; /** Window of the client */ xcb_window_t win; /** Client logical screen */ @@ -232,7 +232,7 @@ struct Client typedef struct client_node_t client_node_t; struct client_node_t { - Client *client; + client_t *client; /** Next and previous client_nodes */ client_node_t *prev, *next; }; @@ -266,7 +266,7 @@ typedef struct tag_client_node_t tag_client_node_t; struct tag_client_node_t { Tag *tag; - Client *client; + client_t *client; /** Next and previous tag_client_nodes */ tag_client_node_t *prev, *next; }; @@ -284,7 +284,7 @@ typedef struct int right; } Padding; -typedef area_t (FloatingPlacement)(Client *); +typedef area_t (FloatingPlacement)(client_t *); typedef struct { /** titlebar_t default parameters */ @@ -369,12 +369,12 @@ struct AwesomeConf bool have_randr; /** Cursors */ xcb_cursor_t cursor[CurLast]; - /** Clients list */ - Client *clients; + /** client_ts list */ + client_t *clients; /** Scratch client */ struct { - Client *client; + client_t *client; bool isvisible; } scratch; /** Path to config file */ diff --git a/tag.c b/tag.c index f6302a8e..7110916b 100644 --- a/tag.c +++ b/tag.c @@ -94,7 +94,7 @@ tag_push_to_screen(Tag *tag, int screen) * \param t the tag to tag the client with */ void -tag_client(Client *c, Tag *t) +tag_client(client_t *c, Tag *t) { tag_client_node_t *tc; @@ -117,7 +117,7 @@ tag_client(Client *c, Tag *t) * \param t the tag to tag the client with */ void -untag_client(Client *c, Tag *t) +untag_client(client_t *c, Tag *t) { tag_client_node_t *tc; @@ -139,7 +139,7 @@ untag_client(Client *c, Tag *t) * \return true if the client is tagged with the tag, false otherwise. */ bool -is_client_tagged(Client *c, Tag *t) +is_client_tagged(client_t *c, Tag *t) { tag_client_node_t *tc; @@ -157,7 +157,7 @@ is_client_tagged(Client *c, Tag *t) * \param c the client */ void -tag_client_with_current_selected(Client *c) +tag_client_with_current_selected(client_t *c) { Tag *tag; VirtScreen vscreen = globalconf.screens[c->screen]; @@ -174,7 +174,7 @@ tag_client_with_current_selected(Client *c) * \param r the rule */ void -tag_client_with_rule(Client *c, rule_t *r) +tag_client_with_rule(client_t *c, rule_t *r) { Tag *tag; bool matched = false; @@ -232,7 +232,7 @@ uicb_client_tag(int screen, char *arg) { int tag_id = -1; Tag *tag, *target_tag; - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; if(!sel) return; @@ -265,7 +265,7 @@ uicb_client_tag(int screen, char *arg) void uicb_client_toggletag(int screen, char *arg) { - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; int i; Bool is_sticky = True; Tag *tag, *target_tag; diff --git a/tag.h b/tag.h index 10c77249..86a28ce1 100644 --- a/tag.h +++ b/tag.h @@ -32,11 +32,11 @@ void tag_view(Tag *, bool); void tag_view_byindex(int, int, bool); void tag_push_to_screen(Tag *, int); Tag ** tags_get_current(int); -void tag_client(Client *, Tag *); -void untag_client(Client *, Tag *); -bool is_client_tagged(Client *, Tag *); -void tag_client_with_rule(Client *, rule_t *r); -void tag_client_with_current_selected(Client *); +void tag_client(client_t *, Tag *); +void untag_client(client_t *, Tag *); +bool is_client_tagged(client_t *, Tag *); +void tag_client_with_rule(client_t *, rule_t *r); +void tag_client_with_current_selected(client_t *); void tag_view_only_byindex(int, int); void tag_append_to_screen(Tag *, int); diff --git a/titlebar.c b/titlebar.c index 55540a61..84c14797 100644 --- a/titlebar.c +++ b/titlebar.c @@ -35,7 +35,7 @@ extern AwesomeConf globalconf; * \param c the client */ void -titlebar_init(Client *c) +titlebar_init(client_t *c) { int width; @@ -149,7 +149,7 @@ titlebar_geometry_remove(titlebar_t *t, area_t geometry) * \param c the client */ void -titlebar_draw(Client *c) +titlebar_draw(client_t *c) { xcb_drawable_t dw = 0; DrawCtx *ctx; @@ -228,7 +228,7 @@ titlebar_draw(Client *c) * \param c the client */ void -titlebar_update_geometry_floating(Client *c) +titlebar_update_geometry_floating(client_t *c) { int width, x_offset = 0, y_offset = 0; @@ -340,7 +340,7 @@ titlebar_update_geometry_floating(Client *c) * \param geometry the geometry the client will receive */ void -titlebar_update_geometry(Client *c, area_t geometry) +titlebar_update_geometry(client_t *c, area_t geometry) { int width, x_offset = 0 , y_offset = 0; @@ -468,7 +468,7 @@ titlebar_position_set(titlebar_t *t, position_t p) void uicb_client_toggletitlebar(int screen __attribute__ ((unused)), char *arg __attribute__ ((unused))) { - Client *c = globalconf.focus->client; + client_t *c = globalconf.focus->client; if(!c || !c->titlebar.sw) return; diff --git a/titlebar.h b/titlebar.h index 3b3e0bd4..91d6e788 100644 --- a/titlebar.h +++ b/titlebar.h @@ -24,10 +24,10 @@ #include "structs.h" -void titlebar_init(Client *); -void titlebar_draw(Client *); -void titlebar_update_geometry_floating(Client *); -void titlebar_update_geometry(Client *, area_t); +void titlebar_init(client_t *); +void titlebar_draw(client_t *); +void titlebar_update_geometry_floating(client_t *); +void titlebar_update_geometry(client_t *, area_t); area_t titlebar_geometry_add(titlebar_t *, area_t); area_t titlebar_geometry_remove(titlebar_t *, area_t); void titlebar_position_set(titlebar_t *, position_t); diff --git a/uicb.c b/uicb.c index 725e2c47..aa1cb45f 100644 --- a/uicb.c +++ b/uicb.c @@ -65,7 +65,7 @@ uicb_restart(int screen, char *arg __attribute__ ((unused))) void uicb_exec(int screen __attribute__ ((unused)), char *cmd) { - Client *c; + client_t *c; char *args, *path; /* remap all clients since some WM won't handle them otherwise */ diff --git a/widgets/focusicon.c b/widgets/focusicon.c index caff0eb9..99f8fa45 100644 --- a/widgets/focusicon.c +++ b/widgets/focusicon.c @@ -35,7 +35,7 @@ focusicon_draw(widget_t *widget, DrawCtx *ctx, int offset, { area_t area; rule_t *r; - Client *sel = focus_get_current_client(widget->statusbar->screen); + client_t *sel = focus_get_current_client(widget->statusbar->screen); NetWMIcon *icon; if(!sel) diff --git a/widgets/taglist.c b/widgets/taglist.c index 3ac0fb62..582b1c49 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -38,7 +38,7 @@ extern AwesomeConf globalconf; static bool isoccupied(Tag *t) { - Client *c; + client_t *c; for(c = globalconf.clients; c; c = c->next) if(is_client_tagged(c, t) && !c->skip && c != globalconf.scratch.client) @@ -50,7 +50,7 @@ isoccupied(Tag *t) static bool isurgent(Tag *t) { - Client *c; + client_t *c; for(c = globalconf.clients; c; c = c->next) if(is_client_tagged(c, t) && c->isurgent) @@ -77,7 +77,7 @@ taglist_draw(widget_t *widget, int used __attribute__ ((unused))) { Tag *tag; - Client *sel = globalconf.focus->client; + client_t *sel = globalconf.focus->client; VirtScreen vscreen = globalconf.screens[widget->statusbar->screen]; int w = 0, flagsize; style_t style; diff --git a/widgets/tasklist.c b/widgets/tasklist.c index 8fd99892..68debec7 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -37,11 +37,11 @@ typedef enum ShowFocus, ShowTags, ShowAll, -} ShowClient; +} Showclient_t; typedef struct { - ShowClient show; + Showclient_t show; bool show_icons; alignment_t align; struct @@ -53,7 +53,7 @@ typedef struct } Data; static inline bool -tasklist_isvisible(Client *c, int screen, ShowClient show) +tasklist_isvisible(client_t *c, int screen, Showclient_t show) { if(c->skip || c->skiptb) return false; @@ -73,7 +73,7 @@ tasklist_isvisible(Client *c, int screen, ShowClient show) static int tasklist_draw(widget_t *widget, DrawCtx *ctx, int offset, int used) { - Client *c; + client_t *c; Data *d = widget->data; rule_t *r; area_t area; @@ -193,7 +193,7 @@ static void tasklist_button_press(widget_t *widget, xcb_button_press_event_t *ev) { Button *b; - Client *c; + client_t *c; Data *d = widget->data; Tag *tag; int n = 0, box_width = 0, i, ci = 0; diff --git a/window.c b/window.c index 2535ff31..e98053b2 100644 --- a/window.c +++ b/window.c @@ -50,7 +50,7 @@ window_setstate(xcb_window_t win, long state) } /** Get a window state (WM_STATE) - * \param w Client window + * \param w client_t window * \return state */ long