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