introduce get_current_tags() and deprecate get_current_{tag,layout}()
This commit is contained in:
parent
58a3c0c494
commit
a0e7aee072
4
layout.h
4
layout.h
|
@ -27,8 +27,8 @@
|
|||
#define AWESOMEPROPS_ATOM(disp) XInternAtom(disp, "_AWESOME_PROPERTIES", False)
|
||||
|
||||
void arrange(int);
|
||||
Layout * get_current_layout(int);
|
||||
Tag * get_current_tag(int);
|
||||
Layout * get_current_layout(int) __attribute__ ((deprecated));
|
||||
Tag * get_current_tag(int) __attribute__ ((deprecated));
|
||||
void restack(int);
|
||||
void loadawesomeprops(int);
|
||||
void saveawesomeprops(int);
|
||||
|
|
21
tag.c
21
tag.c
|
@ -137,6 +137,27 @@ tag_client_with_rules(Client *c)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
Tag **
|
||||
get_current_tags(int screen)
|
||||
{
|
||||
Tag *tag, **tags = NULL;
|
||||
int n = 0;
|
||||
|
||||
for(tag = globalconf.screens[screen].tags; tag; tag = tag->next)
|
||||
if(tag->selected)
|
||||
{
|
||||
p_realloc(tags, ++n);
|
||||
tags[n - 1] = tag;
|
||||
}
|
||||
|
||||
/* finish with null */
|
||||
p_realloc(tags, ++n);
|
||||
tags[n - 1] = NULL;
|
||||
|
||||
return tags;
|
||||
}
|
||||
|
||||
/** Tag selected window with tag
|
||||
* \param screen Screen ID
|
||||
* \param arg Tag name
|
||||
|
|
1
tag.h
1
tag.h
|
@ -27,6 +27,7 @@
|
|||
/** Check if a client is tiled */
|
||||
#define IS_TILED(client, screen) (client && !client->isfloating && client_isvisible(client, screen))
|
||||
|
||||
Tag ** get_current_tags(int );
|
||||
void tag_client(Client *, Tag *, int);
|
||||
void untag_client(Client *, Tag *, int);
|
||||
Bool is_client_tagged(Client *, Tag *, int);
|
||||
|
|
Loading…
Reference in New Issue