2020-08-20 11:30:12 +00:00
|
|
|
int
|
2020-09-09 15:24:02 +00:00
|
|
|
width_wintitle_hidden(Bar *bar, BarArg *a)
|
2020-08-20 11:30:12 +00:00
|
|
|
{
|
2020-09-09 15:24:02 +00:00
|
|
|
return a->w;
|
2020-08-20 11:30:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2020-09-09 15:24:02 +00:00
|
|
|
draw_wintitle_hidden(Bar *bar, BarArg *a)
|
2020-08-20 11:30:12 +00:00
|
|
|
{
|
2020-09-09 15:24:02 +00:00
|
|
|
drw_rect(drw, a->x, a->y, a->w, a->h, 1, 1);
|
|
|
|
return calc_wintitle_hidden(bar->mon, a->x, a->w, -1, flextitledraw, NULL, a);
|
2020-08-20 11:30:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2020-09-09 15:24:02 +00:00
|
|
|
click_wintitle_hidden(Bar *bar, Arg *arg, BarArg *a)
|
2020-08-20 11:30:12 +00:00
|
|
|
{
|
2020-09-09 15:24:02 +00:00
|
|
|
calc_wintitle_hidden(bar->mon, 0, a->w, a->x, flextitleclick, arg, a);
|
2020-08-20 11:30:12 +00:00
|
|
|
return ClkWinTitle;
|
|
|
|
}
|
|
|
|
|
2020-08-22 06:43:07 +00:00
|
|
|
int
|
2020-08-20 11:30:12 +00:00
|
|
|
calc_wintitle_hidden(
|
|
|
|
Monitor *m, int offx, int tabw, int passx,
|
2020-09-09 15:24:02 +00:00
|
|
|
void(*tabfn)(Monitor *, Client *, int, int, int, int, Arg *arg, BarArg *barg),
|
|
|
|
Arg *arg, BarArg *barg
|
2020-08-20 11:30:12 +00:00
|
|
|
) {
|
|
|
|
Client *c;
|
|
|
|
int clientsnhidden = 0, w, r;
|
|
|
|
int groupactive = GRP_HIDDEN;
|
|
|
|
|
|
|
|
for (c = m->clients; c; c = c->next) {
|
|
|
|
if (!ISVISIBLE(c))
|
|
|
|
continue;
|
|
|
|
if (HIDDEN(c))
|
|
|
|
clientsnhidden++;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!clientsnhidden)
|
2020-08-22 06:43:07 +00:00
|
|
|
return 0;
|
2020-08-20 11:30:12 +00:00
|
|
|
|
|
|
|
w = tabw / clientsnhidden;
|
|
|
|
r = tabw % clientsnhidden;
|
2020-09-09 15:24:02 +00:00
|
|
|
c = flextitledrawarea(m, m->clients, offx, r, w, clientsnhidden, SCHEMEFOR(GRP_HIDDEN), 0, 1, 0, passx, tabfn, arg, barg);
|
2020-08-22 06:43:07 +00:00
|
|
|
return 1;
|
2021-06-14 05:16:17 +00:00
|
|
|
}
|
|
|
|
|