[tag] Rename Tag type to tag_t
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
7405ff9a68
commit
e4d091ab2e
12
client.c
12
client.c
|
@ -52,7 +52,7 @@ static bool
|
||||||
client_loadprops(client_t * c, int screen)
|
client_loadprops(client_t * c, int screen)
|
||||||
{
|
{
|
||||||
int i, ntags = 0;
|
int i, ntags = 0;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
char *prop;
|
char *prop;
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ client_isprotodel(xcb_connection_t *c, xcb_window_t win)
|
||||||
static bool
|
static bool
|
||||||
client_isvisible_anyscreen(client_t *c)
|
client_isvisible_anyscreen(client_t *c)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
int screen;
|
int screen;
|
||||||
|
|
||||||
if(!c)
|
if(!c)
|
||||||
|
@ -138,7 +138,7 @@ client_isvisible_anyscreen(client_t *c)
|
||||||
bool
|
bool
|
||||||
client_isvisible(client_t *c, int screen)
|
client_isvisible(client_t *c, int screen)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
if(!c || c->screen != screen)
|
if(!c || c->screen != screen)
|
||||||
return false;
|
return false;
|
||||||
|
@ -349,7 +349,7 @@ client_manage(xcb_window_t w, xcb_get_geometry_reply_t *wgeom, int screen)
|
||||||
xcb_window_t trans;
|
xcb_window_t trans;
|
||||||
bool rettrans, retloadprops;
|
bool rettrans, retloadprops;
|
||||||
uint32_t config_win_val;
|
uint32_t config_win_val;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
rule_t *rule;
|
rule_t *rule;
|
||||||
xcb_size_hints_t *u_size_hints;
|
xcb_size_hints_t *u_size_hints;
|
||||||
|
|
||||||
|
@ -667,7 +667,7 @@ client_saveprops(client_t *c)
|
||||||
{
|
{
|
||||||
int i = 0, ntags = 0;
|
int i = 0, ntags = 0;
|
||||||
char *prop;
|
char *prop;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
for(tag = globalconf.screens[c->screen].tags; tag; tag = tag->next)
|
for(tag = globalconf.screens[c->screen].tags; tag; tag = tag->next)
|
||||||
ntags++;
|
ntags++;
|
||||||
|
@ -702,7 +702,7 @@ client_unban(client_t *c)
|
||||||
void
|
void
|
||||||
client_unmanage(client_t *c)
|
client_unmanage(client_t *c)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
/* The server grab construct avoids race conditions. */
|
/* The server grab construct avoids race conditions. */
|
||||||
xcb_grab_server(globalconf.connection);
|
xcb_grab_server(globalconf.connection);
|
||||||
|
|
2
config.c
2
config.c
|
@ -312,7 +312,7 @@ config_parse_screen(cfg_t *cfg, int screen)
|
||||||
const char *tmp;
|
const char *tmp;
|
||||||
FloatingPlacement flpl;
|
FloatingPlacement flpl;
|
||||||
Layout *layout = NULL;
|
Layout *layout = NULL;
|
||||||
Tag *tag = NULL;
|
tag_t *tag = NULL;
|
||||||
statusbar_t *statusbar = NULL;
|
statusbar_t *statusbar = NULL;
|
||||||
cfg_t *cfg_general, *cfg_styles, *cfg_screen, *cfg_tags,
|
cfg_t *cfg_general, *cfg_styles, *cfg_screen, *cfg_tags,
|
||||||
*cfg_layouts, *cfg_padding, *cfgsectmp, *cfg_titlebar,
|
*cfg_layouts, *cfg_padding, *cfgsectmp, *cfg_titlebar,
|
||||||
|
|
8
ewmh.c
8
ewmh.c
|
@ -188,7 +188,7 @@ void
|
||||||
ewmh_update_net_numbers_of_desktop(int phys_screen)
|
ewmh_update_net_numbers_of_desktop(int phys_screen)
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
for(tag = globalconf.screens[phys_screen].tags; tag; tag = tag->next)
|
for(tag = globalconf.screens[phys_screen].tags; tag; tag = tag->next)
|
||||||
count++;
|
count++;
|
||||||
|
@ -202,7 +202,7 @@ void
|
||||||
ewmh_update_net_current_desktop(int phys_screen)
|
ewmh_update_net_current_desktop(int phys_screen)
|
||||||
{
|
{
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
Tag *tag, **curtags = tags_get_current(phys_screen);
|
tag_t *tag, **curtags = tags_get_current(phys_screen);
|
||||||
|
|
||||||
for(tag = globalconf.screens[phys_screen].tags; tag != curtags[0]; tag = tag->next)
|
for(tag = globalconf.screens[phys_screen].tags; tag != curtags[0]; tag = tag->next)
|
||||||
count++;
|
count++;
|
||||||
|
@ -219,7 +219,7 @@ ewmh_update_net_desktop_names(int phys_screen)
|
||||||
{
|
{
|
||||||
char buf[1024], *pos;
|
char buf[1024], *pos;
|
||||||
ssize_t len, curr_size;
|
ssize_t len, curr_size;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
pos = buf;
|
pos = buf;
|
||||||
len = 0;
|
len = 0;
|
||||||
|
@ -256,7 +256,7 @@ ewmh_process_state_atom(client_t *c, xcb_atom_t state, int set)
|
||||||
|
|
||||||
if(state == net_wm_state_sticky)
|
if(state == net_wm_state_sticky)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
for(tag = globalconf.screens[c->screen].tags; tag; tag = tag->next)
|
for(tag = globalconf.screens[c->screen].tags; tag; tag = tag->next)
|
||||||
tag_client(c, tag);
|
tag_client(c, tag);
|
||||||
}
|
}
|
||||||
|
|
10
focus.c
10
focus.c
|
@ -67,10 +67,10 @@ focus_delete_client(client_t *c)
|
||||||
}
|
}
|
||||||
|
|
||||||
static client_t *
|
static client_t *
|
||||||
focus_get_latest_client_for_tags(Tag **t, int nindex)
|
focus_get_latest_client_for_tags(tag_t **t, int nindex)
|
||||||
{
|
{
|
||||||
client_node_t *node;
|
client_node_t *node;
|
||||||
Tag **tags;
|
tag_t **tags;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
for(node = globalconf.focus; node; node = node->next)
|
for(node = globalconf.focus; node; node = node->next)
|
||||||
|
@ -92,7 +92,7 @@ focus_get_latest_client_for_tags(Tag **t, int nindex)
|
||||||
client_t *
|
client_t *
|
||||||
focus_get_current_client(int screen)
|
focus_get_current_client(int screen)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
client_t *sel = focus_get_latest_client_for_tags(curtags, 0);
|
client_t *sel = focus_get_latest_client_for_tags(curtags, 0);
|
||||||
p_delete(&curtags);
|
p_delete(&curtags);
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ void
|
||||||
uicb_focus_history(int screen, char *arg)
|
uicb_focus_history(int screen, char *arg)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Tag **curtags;
|
tag_t **curtags;
|
||||||
client_t *c;
|
client_t *c;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
|
@ -136,7 +136,7 @@ void
|
||||||
uicb_focus_client_byname(int screen, char *arg)
|
uicb_focus_client_byname(int screen, char *arg)
|
||||||
{
|
{
|
||||||
client_t *c;
|
client_t *c;
|
||||||
Tag **curtags, **tag;
|
tag_t **curtags, **tag;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
{
|
{
|
||||||
|
|
4
layout.c
4
layout.c
|
@ -124,7 +124,7 @@ layout_refresh(void)
|
||||||
Layout *
|
Layout *
|
||||||
layout_get_current(int screen)
|
layout_get_current(int screen)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
Layout *l = curtags[0]->layout;
|
Layout *l = curtags[0]->layout;
|
||||||
p_delete(&curtags);
|
p_delete(&curtags);
|
||||||
return l;
|
return l;
|
||||||
|
@ -140,7 +140,7 @@ void
|
||||||
uicb_tag_setlayout(int screen, char *arg)
|
uicb_tag_setlayout(int screen, char *arg)
|
||||||
{
|
{
|
||||||
Layout *l = globalconf.screens[screen].layouts;
|
Layout *l = globalconf.screens[screen].layouts;
|
||||||
Tag *tag, **curtags;
|
tag_t *tag, **curtags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
|
|
|
@ -34,7 +34,7 @@ extern AwesomeConf globalconf;
|
||||||
void
|
void
|
||||||
uicb_tag_setnmaster(int screen, char * arg)
|
uicb_tag_setnmaster(int screen, char * arg)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
Layout *curlay = curtags[0]->layout;
|
Layout *curlay = curtags[0]->layout;
|
||||||
client_t *c;
|
client_t *c;
|
||||||
int n;
|
int n;
|
||||||
|
@ -63,7 +63,7 @@ uicb_tag_setnmaster(int screen, char * arg)
|
||||||
void
|
void
|
||||||
uicb_tag_setncol(int screen, char * arg)
|
uicb_tag_setncol(int screen, char * arg)
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
Layout *curlay = curtags[0]->layout;
|
Layout *curlay = curtags[0]->layout;
|
||||||
client_t *c;
|
client_t *c;
|
||||||
int n;
|
int n;
|
||||||
|
@ -94,7 +94,7 @@ void
|
||||||
uicb_tag_setmwfact(int screen, char *arg)
|
uicb_tag_setmwfact(int screen, char *arg)
|
||||||
{
|
{
|
||||||
char *newarg;
|
char *newarg;
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
Layout *curlay = curtags[0]->layout;
|
Layout *curlay = curtags[0]->layout;
|
||||||
|
|
||||||
if(!arg || (curlay->arrange != layout_tile
|
if(!arg || (curlay->arrange != layout_tile
|
||||||
|
@ -135,7 +135,7 @@ _tile(int screen, const position_t position)
|
||||||
int real_ncol = 1, win_by_col = 1, current_col = 0;
|
int real_ncol = 1, win_by_col = 1, current_col = 0;
|
||||||
area_t area, geometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t area, geometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
client_t *c;
|
client_t *c;
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
|
|
||||||
area = screen_get_area(screen,
|
area = screen_get_area(screen,
|
||||||
globalconf.screens[screen].statusbar,
|
globalconf.screens[screen].statusbar,
|
||||||
|
|
2
mouse.c
2
mouse.c
|
@ -325,7 +325,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
|
||||||
xcb_generic_event_t *ev = NULL;
|
xcb_generic_event_t *ev = NULL;
|
||||||
xcb_motion_notify_event_t *ev_motion = NULL;
|
xcb_motion_notify_event_t *ev_motion = NULL;
|
||||||
client_t *c = globalconf.focus->client;
|
client_t *c = globalconf.focus->client;
|
||||||
Tag **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
Layout *layout = curtags[0]->layout;
|
Layout *layout = curtags[0]->layout;
|
||||||
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
double mwfact;
|
double mwfact;
|
||||||
|
|
2
rules.c
2
rules.c
|
@ -42,7 +42,7 @@ rules_compile_regex(char *val)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
tag_match_rule(Tag *t, rule_t *r)
|
tag_match_rule(tag_t *t, rule_t *r)
|
||||||
{
|
{
|
||||||
regmatch_t tmp;
|
regmatch_t tmp;
|
||||||
|
|
||||||
|
|
2
rules.h
2
rules.h
|
@ -27,7 +27,7 @@
|
||||||
#define RULE_NOSCREEN -1
|
#define RULE_NOSCREEN -1
|
||||||
|
|
||||||
regex_t * rules_compile_regex(char *);
|
regex_t * rules_compile_regex(char *);
|
||||||
bool tag_match_rule(Tag *, rule_t *);
|
bool tag_match_rule(tag_t *, rule_t *);
|
||||||
rule_t * rule_matching_client(client_t *);
|
rule_t * rule_matching_client(client_t *);
|
||||||
|
|
||||||
DO_SLIST(rule_t, rule, p_delete)
|
DO_SLIST(rule_t, rule, p_delete)
|
||||||
|
|
2
screen.c
2
screen.c
|
@ -128,7 +128,7 @@ screen_virttophys(int screen)
|
||||||
void
|
void
|
||||||
move_client_to_screen(client_t *c, int new_screen, bool doresize)
|
move_client_to_screen(client_t *c, int new_screen, bool doresize)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
int old_screen = c->screen;
|
int old_screen = c->screen;
|
||||||
area_t from, to;
|
area_t from, to;
|
||||||
|
|
||||||
|
|
10
structs.h
10
structs.h
|
@ -238,8 +238,8 @@ struct client_node_t
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Tag type */
|
/** Tag type */
|
||||||
typedef struct Tag Tag;
|
typedef struct _tag_t tag_t;
|
||||||
struct Tag
|
struct _tag_t
|
||||||
{
|
{
|
||||||
/** Tag name */
|
/** Tag name */
|
||||||
char *name;
|
char *name;
|
||||||
|
@ -258,14 +258,14 @@ struct Tag
|
||||||
/** Number of columns in tile layout */
|
/** Number of columns in tile layout */
|
||||||
int ncol;
|
int ncol;
|
||||||
/** Next and previous tags */
|
/** Next and previous tags */
|
||||||
Tag *prev, *next;
|
tag_t *prev, *next;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** tag_client_node type */
|
/** tag_client_node type */
|
||||||
typedef struct tag_client_node_t tag_client_node_t;
|
typedef struct tag_client_node_t tag_client_node_t;
|
||||||
struct tag_client_node_t
|
struct tag_client_node_t
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
client_t *client;
|
client_t *client;
|
||||||
/** Next and previous tag_client_nodes */
|
/** Next and previous tag_client_nodes */
|
||||||
tag_client_node_t *prev, *next;
|
tag_client_node_t *prev, *next;
|
||||||
|
@ -321,7 +321,7 @@ typedef struct
|
||||||
/** Transparency of focused clients */
|
/** Transparency of focused clients */
|
||||||
double opacity_focused;
|
double opacity_focused;
|
||||||
/** Tag list */
|
/** Tag list */
|
||||||
Tag *tags;
|
tag_t *tags;
|
||||||
/** Layout list */
|
/** Layout list */
|
||||||
Layout *layouts;
|
Layout *layouts;
|
||||||
/** Status bar */
|
/** Status bar */
|
||||||
|
|
56
tag.c
56
tag.c
|
@ -39,12 +39,12 @@ extern AwesomeConf globalconf;
|
||||||
* \param ncol number of columns for slaves windows
|
* \param ncol number of columns for slaves windows
|
||||||
* \return a new tag with all these parameters
|
* \return a new tag with all these parameters
|
||||||
*/
|
*/
|
||||||
Tag *
|
tag_t *
|
||||||
tag_new(const char *name, Layout *layout, double mwfact, int nmaster, int ncol)
|
tag_new(const char *name, Layout *layout, double mwfact, int nmaster, int ncol)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
tag = p_new(Tag, 1);
|
tag = p_new(tag_t, 1);
|
||||||
tag->name = a_strdup(name);
|
tag->name = a_strdup(name);
|
||||||
tag->layout = layout;
|
tag->layout = layout;
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ tag_new(const char *name, Layout *layout, double mwfact, int nmaster, int ncol)
|
||||||
* \param screen the screen id
|
* \param screen the screen id
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_append_to_screen(Tag *tag, int screen)
|
tag_append_to_screen(tag_t *tag, int screen)
|
||||||
{
|
{
|
||||||
int phys_screen = screen_virttophys(screen);
|
int phys_screen = screen_virttophys(screen);
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ tag_append_to_screen(Tag *tag, int screen)
|
||||||
* \param screen the screen
|
* \param screen the screen
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_push_to_screen(Tag *tag, int screen)
|
tag_push_to_screen(tag_t *tag, int screen)
|
||||||
{
|
{
|
||||||
tag->screen = screen;
|
tag->screen = screen;
|
||||||
tag_list_push(&globalconf.screens[screen].tags, tag);
|
tag_list_push(&globalconf.screens[screen].tags, tag);
|
||||||
|
@ -94,7 +94,7 @@ tag_push_to_screen(Tag *tag, int screen)
|
||||||
* \param t the tag to tag the client with
|
* \param t the tag to tag the client with
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_client(client_t *c, Tag *t)
|
tag_client(client_t *c, tag_t *t)
|
||||||
{
|
{
|
||||||
tag_client_node_t *tc;
|
tag_client_node_t *tc;
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ tag_client(client_t *c, Tag *t)
|
||||||
* \param t the tag to tag the client with
|
* \param t the tag to tag the client with
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
untag_client(client_t *c, Tag *t)
|
untag_client(client_t *c, tag_t *t)
|
||||||
{
|
{
|
||||||
tag_client_node_t *tc;
|
tag_client_node_t *tc;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ untag_client(client_t *c, Tag *t)
|
||||||
* \return true if the client is tagged with the tag, false otherwise.
|
* \return true if the client is tagged with the tag, false otherwise.
|
||||||
*/
|
*/
|
||||||
bool
|
bool
|
||||||
is_client_tagged(client_t *c, Tag *t)
|
is_client_tagged(client_t *c, tag_t *t)
|
||||||
{
|
{
|
||||||
tag_client_node_t *tc;
|
tag_client_node_t *tc;
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ is_client_tagged(client_t *c, Tag *t)
|
||||||
void
|
void
|
||||||
tag_client_with_current_selected(client_t *c)
|
tag_client_with_current_selected(client_t *c)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
VirtScreen vscreen = globalconf.screens[c->screen];
|
VirtScreen vscreen = globalconf.screens[c->screen];
|
||||||
|
|
||||||
for(tag = vscreen.tags; tag; tag = tag->next)
|
for(tag = vscreen.tags; tag; tag = tag->next)
|
||||||
|
@ -176,7 +176,7 @@ tag_client_with_current_selected(client_t *c)
|
||||||
void
|
void
|
||||||
tag_client_with_rule(client_t *c, rule_t *r)
|
tag_client_with_rule(client_t *c, rule_t *r)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
bool matched = false;
|
bool matched = false;
|
||||||
|
|
||||||
if(!r) return;
|
if(!r) return;
|
||||||
|
@ -202,13 +202,13 @@ tag_client_with_rule(client_t *c, rule_t *r)
|
||||||
* \param screen screen id
|
* \param screen screen id
|
||||||
* \return a double pointer of tag list finished with a NULL element
|
* \return a double pointer of tag list finished with a NULL element
|
||||||
*/
|
*/
|
||||||
Tag **
|
tag_t **
|
||||||
tags_get_current(int screen)
|
tags_get_current(int screen)
|
||||||
{
|
{
|
||||||
Tag *tag, **tags = NULL;
|
tag_t *tag, **tags = NULL;
|
||||||
int n = 1;
|
int n = 1;
|
||||||
|
|
||||||
tags = p_new(Tag *, n);
|
tags = p_new(tag_t *, n);
|
||||||
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
|
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
|
||||||
if(tag->selected)
|
if(tag->selected)
|
||||||
{
|
{
|
||||||
|
@ -224,14 +224,14 @@ tags_get_current(int screen)
|
||||||
|
|
||||||
/** Tag the focused client with the given tag.
|
/** Tag the focused client with the given tag.
|
||||||
* \param screen Screen ID
|
* \param screen Screen ID
|
||||||
* \param arg Tag name
|
* \param arg tag name
|
||||||
* \ingroup ui_callback
|
* \ingroup ui_callback
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
uicb_client_tag(int screen, char *arg)
|
uicb_client_tag(int screen, char *arg)
|
||||||
{
|
{
|
||||||
int tag_id = -1;
|
int tag_id = -1;
|
||||||
Tag *tag, *target_tag;
|
tag_t *tag, *target_tag;
|
||||||
client_t *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
|
@ -268,7 +268,7 @@ uicb_client_toggletag(int screen, char *arg)
|
||||||
client_t *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
int i;
|
int i;
|
||||||
Bool is_sticky = True;
|
Bool is_sticky = True;
|
||||||
Tag *tag, *target_tag;
|
tag_t *tag, *target_tag;
|
||||||
|
|
||||||
if(!sel)
|
if(!sel)
|
||||||
return;
|
return;
|
||||||
|
@ -308,14 +308,14 @@ uicb_client_toggletag(int screen, char *arg)
|
||||||
|
|
||||||
/** Toggle the visibility of a tag.
|
/** Toggle the visibility of a tag.
|
||||||
* \param screen Screen ID
|
* \param screen Screen ID
|
||||||
* \param arg Tag name
|
* \param arg tag_t name
|
||||||
* \ingroup ui_callback
|
* \ingroup ui_callback
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
uicb_tag_toggleview(int screen, char *arg)
|
uicb_tag_toggleview(int screen, char *arg)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
Tag *tag, *target_tag,
|
tag_t *tag, *target_tag,
|
||||||
**backtag, **curtags = tags_get_current(screen);
|
**backtag, **curtags = tags_get_current(screen);
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
|
@ -344,9 +344,9 @@ uicb_tag_toggleview(int screen, char *arg)
|
||||||
* \param target the tag to see
|
* \param target the tag to see
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
tag_view_only(Tag *target)
|
tag_view_only(tag_t *target)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
if(!target) return;
|
if(!target) return;
|
||||||
|
|
||||||
|
@ -362,7 +362,7 @@ tag_view_only(Tag *target)
|
||||||
void
|
void
|
||||||
tag_view_byindex(int screen, int dindex, bool view)
|
tag_view_byindex(int screen, int dindex, bool view)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
if(dindex < 0)
|
if(dindex < 0)
|
||||||
return;
|
return;
|
||||||
|
@ -379,7 +379,7 @@ tag_view_byindex(int screen, int dindex, bool view)
|
||||||
void
|
void
|
||||||
tag_view_only_byindex(int screen, int dindex)
|
tag_view_only_byindex(int screen, int dindex)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
if(dindex < 0)
|
if(dindex < 0)
|
||||||
return;
|
return;
|
||||||
|
@ -394,7 +394,7 @@ tag_view_only_byindex(int screen, int dindex)
|
||||||
* \param view set visible or not
|
* \param view set visible or not
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
tag_view(Tag *tag, bool view)
|
tag_view(tag_t *tag, bool view)
|
||||||
{
|
{
|
||||||
tag->was_selected = tag->selected;
|
tag->was_selected = tag->selected;
|
||||||
tag->selected = view;
|
tag->selected = view;
|
||||||
|
@ -411,7 +411,7 @@ tag_view(Tag *tag, bool view)
|
||||||
void
|
void
|
||||||
uicb_tag_view(int screen, char *arg)
|
uicb_tag_view(int screen, char *arg)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
if(arg)
|
if(arg)
|
||||||
tag_view_only_byindex(screen, atoi(arg) - 1);
|
tag_view_only_byindex(screen, atoi(arg) - 1);
|
||||||
|
@ -428,7 +428,7 @@ uicb_tag_view(int screen, char *arg)
|
||||||
void
|
void
|
||||||
uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused)))
|
uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
|
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
|
||||||
tag_view(tag, tag->was_selected);
|
tag_view(tag, tag->was_selected);
|
||||||
|
@ -442,7 +442,7 @@ uicb_tag_prev_selected(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused)))
|
uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Tag *tag, **curtags = tags_get_current(screen);
|
tag_t *tag, **curtags = tags_get_current(screen);
|
||||||
|
|
||||||
tag = tag_list_next_cycle(&globalconf.screens[screen].tags, curtags[0]);
|
tag = tag_list_next_cycle(&globalconf.screens[screen].tags, curtags[0]);
|
||||||
|
|
||||||
|
@ -460,7 +460,7 @@ uicb_tag_viewnext(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused)))
|
uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Tag *tag, **curtags = tags_get_current(screen);
|
tag_t *tag, **curtags = tags_get_current(screen);
|
||||||
|
|
||||||
tag = tag_list_prev_cycle(&globalconf.screens[screen].tags, curtags[0]);
|
tag = tag_list_prev_cycle(&globalconf.screens[screen].tags, curtags[0]);
|
||||||
|
|
||||||
|
@ -477,7 +477,7 @@ uicb_tag_viewprev(int screen, char *arg __attribute__ ((unused)))
|
||||||
void
|
void
|
||||||
uicb_tag_create(int screen, char *arg)
|
uicb_tag_create(int screen, char *arg)
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
if(!a_strlen(arg))
|
if(!a_strlen(arg))
|
||||||
return;
|
return;
|
||||||
|
|
18
tag.h
18
tag.h
|
@ -27,18 +27,18 @@
|
||||||
/** Check if a client is tiled */
|
/** Check if a client is tiled */
|
||||||
#define IS_TILED(client, screen) (client && !client->isfloating && !client->ismax && client_isvisible(client, screen))
|
#define IS_TILED(client, screen) (client && !client->isfloating && !client->ismax && client_isvisible(client, screen))
|
||||||
|
|
||||||
Tag * tag_new(const char *, Layout *, double, int, int);
|
tag_t * tag_new(const char *, Layout *, double, int, int);
|
||||||
void tag_view(Tag *, bool);
|
void tag_view(tag_t *, bool);
|
||||||
void tag_view_byindex(int, int, bool);
|
void tag_view_byindex(int, int, bool);
|
||||||
void tag_push_to_screen(Tag *, int);
|
void tag_push_to_screen(tag_t *, int);
|
||||||
Tag ** tags_get_current(int);
|
tag_t ** tags_get_current(int);
|
||||||
void tag_client(client_t *, Tag *);
|
void tag_client(client_t *, tag_t *);
|
||||||
void untag_client(client_t *, Tag *);
|
void untag_client(client_t *, tag_t *);
|
||||||
bool is_client_tagged(client_t *, Tag *);
|
bool is_client_tagged(client_t *, tag_t *);
|
||||||
void tag_client_with_rule(client_t *, rule_t *r);
|
void tag_client_with_rule(client_t *, rule_t *r);
|
||||||
void tag_client_with_current_selected(client_t *);
|
void tag_client_with_current_selected(client_t *);
|
||||||
void tag_view_only_byindex(int, int);
|
void tag_view_only_byindex(int, int);
|
||||||
void tag_append_to_screen(Tag *, int);
|
void tag_append_to_screen(tag_t *, int);
|
||||||
|
|
||||||
uicb_t uicb_client_tag;
|
uicb_t uicb_client_tag;
|
||||||
uicb_t uicb_client_toggletag;
|
uicb_t uicb_client_toggletag;
|
||||||
|
@ -49,7 +49,7 @@ uicb_t uicb_tag_viewnext;
|
||||||
uicb_t uicb_tag_viewprev;
|
uicb_t uicb_tag_viewprev;
|
||||||
uicb_t uicb_tag_create;
|
uicb_t uicb_tag_create;
|
||||||
|
|
||||||
DO_SLIST(Tag, tag, p_delete)
|
DO_SLIST(tag_t, tag, p_delete)
|
||||||
DO_SLIST(tag_client_node_t, tag_client_node, p_delete)
|
DO_SLIST(tag_client_node_t, tag_client_node, p_delete)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@ layoutinfo_draw(widget_t *widget,
|
||||||
int offset,
|
int offset,
|
||||||
int used __attribute__ ((unused)))
|
int used __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Tag **curtags = tags_get_current(widget->statusbar->screen);
|
tag_t **curtags = tags_get_current(widget->statusbar->screen);
|
||||||
area_t area = draw_get_image_size(curtags[0]->layout->image);
|
area_t area = draw_get_image_size(curtags[0]->layout->image);
|
||||||
|
|
||||||
if(!widget->user_supplied_x)
|
if(!widget->user_supplied_x)
|
||||||
|
|
|
@ -36,7 +36,7 @@ extern AwesomeConf globalconf;
|
||||||
* \return true or false
|
* \return true or false
|
||||||
*/
|
*/
|
||||||
static bool
|
static bool
|
||||||
isoccupied(Tag *t)
|
isoccupied(tag_t *t)
|
||||||
{
|
{
|
||||||
client_t *c;
|
client_t *c;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ isoccupied(Tag *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
isurgent(Tag *t)
|
isurgent(tag_t *t)
|
||||||
{
|
{
|
||||||
client_t *c;
|
client_t *c;
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ isurgent(Tag *t)
|
||||||
}
|
}
|
||||||
|
|
||||||
static style_t
|
static style_t
|
||||||
taglist_style_get(VirtScreen vscreen, Tag *tag)
|
taglist_style_get(VirtScreen vscreen, tag_t *tag)
|
||||||
{
|
{
|
||||||
if(tag->selected)
|
if(tag->selected)
|
||||||
return vscreen.styles.focus;
|
return vscreen.styles.focus;
|
||||||
|
@ -76,7 +76,7 @@ taglist_draw(widget_t *widget,
|
||||||
int offset,
|
int offset,
|
||||||
int used __attribute__ ((unused)))
|
int used __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
client_t *sel = globalconf.focus->client;
|
client_t *sel = globalconf.focus->client;
|
||||||
VirtScreen vscreen = globalconf.screens[widget->statusbar->screen];
|
VirtScreen vscreen = globalconf.screens[widget->statusbar->screen];
|
||||||
int w = 0, flagsize;
|
int w = 0, flagsize;
|
||||||
|
@ -141,7 +141,7 @@ taglist_button_press(widget_t *widget, xcb_button_press_event_t *ev)
|
||||||
{
|
{
|
||||||
VirtScreen vscreen = globalconf.screens[widget->statusbar->screen];
|
VirtScreen vscreen = globalconf.screens[widget->statusbar->screen];
|
||||||
Button *b;
|
Button *b;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
char buf[4];
|
char buf[4];
|
||||||
int prev_width = 0, width = 0, i = 1;
|
int prev_width = 0, width = 0, i = 1;
|
||||||
style_t style;
|
style_t style;
|
||||||
|
|
|
@ -195,7 +195,7 @@ tasklist_button_press(widget_t *widget, xcb_button_press_event_t *ev)
|
||||||
Button *b;
|
Button *b;
|
||||||
client_t *c;
|
client_t *c;
|
||||||
Data *d = widget->data;
|
Data *d = widget->data;
|
||||||
Tag *tag;
|
tag_t *tag;
|
||||||
int n = 0, box_width = 0, i, ci = 0;
|
int n = 0, box_width = 0, i, ci = 0;
|
||||||
|
|
||||||
/* button1 give focus */
|
/* button1 give focus */
|
||||||
|
|
Loading…
Reference in New Issue