Client: Add "all" cmd option to clientlist uicb function to display all client in menu instead only in current tag
This commit is contained in:
14
src/client.c
14
src/client.c
@@ -1342,13 +1342,17 @@ uicb_clientlist(uicb_t cmd)
|
|||||||
{
|
{
|
||||||
int i, d, u, x, y;
|
int i, d, u, x, y;
|
||||||
int n = 0;
|
int n = 0;
|
||||||
|
Bool all = False;
|
||||||
Window w;
|
Window w;
|
||||||
Client *c = NULL;
|
Client *c = NULL;
|
||||||
|
|
||||||
screen_get_sel();
|
screen_get_sel();
|
||||||
|
|
||||||
|
if(cmd && !strcmp(cmd, "all"))
|
||||||
|
all = True;
|
||||||
|
|
||||||
for(c = clients; c; c = c->next)
|
for(c = clients; c; c = c->next)
|
||||||
if(!ishide(c, selscreen))
|
if(!ishide(c, selscreen) || all)
|
||||||
++n;
|
++n;
|
||||||
|
|
||||||
if(n > 0)
|
if(n > 0)
|
||||||
@@ -1364,7 +1368,7 @@ uicb_clientlist(uicb_t cmd)
|
|||||||
conf.colors.text);
|
conf.colors.text);
|
||||||
|
|
||||||
for(i = 0, c = clients; c; c = c->next)
|
for(i = 0, c = clients; c; c = c->next)
|
||||||
if(!ishide(c, selscreen))
|
if(!ishide(c, selscreen) || all)
|
||||||
{
|
{
|
||||||
sprintf(clist_index[i].key, "%d", i);
|
sprintf(clist_index[i].key, "%d", i);
|
||||||
clist_index[i].client = c;
|
clist_index[i].client = c;
|
||||||
@@ -1401,6 +1405,12 @@ uicb_client_select(uicb_t cmd)
|
|||||||
for(i = 0; i < MAXCLIST && clist_index[i].client; ++i)
|
for(i = 0; i < MAXCLIST && clist_index[i].client; ++i)
|
||||||
if(!strcmp(cmd, clist_index[i].key))
|
if(!strcmp(cmd, clist_index[i].key))
|
||||||
{
|
{
|
||||||
|
if(clist_index[i].client->screen != selscreen)
|
||||||
|
screen_set_sel(clist_index[i].client->screen);
|
||||||
|
|
||||||
|
if(clist_index[i].client->tag != seltag[clist_index[i].client->screen])
|
||||||
|
tag_set(clist_index[i].client->tag);
|
||||||
|
|
||||||
client_focus(clist_index[i].client);
|
client_focus(clist_index[i].client);
|
||||||
client_raise(clist_index[i].client);
|
client_raise(clist_index[i].client);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user