Merge branch 'attachtop'

This commit is contained in:
2025-04-10 03:05:45 +02:00
2 changed files with 48 additions and 1 deletions

13
dwl.c
View File

@@ -2110,7 +2110,18 @@ mapnotify(struct wl_listener *listener, void *data)
c->geom.height += 2 * c->bw;
/* Insert this client into client lists. */
wl_list_insert(&clients, &c->link);
i = 0;
wl_list_for_each(w, &clients, link) {
if (!VISIBLEON(w, selmon) || c->isfloating)
continue;
p = w;
if (++i >= selmon->nmaster)
break;
}
if (i > 0)
wl_list_insert(&p->link, &c->link);
else
wl_list_insert(&clients, &c->link);
wl_list_insert(&fstack, &c->flink);
/* Set initial monitor, tags, floating status, and focus: