Add attachtop patch
This commit is contained in:
17
dwl.c
17
dwl.c
@@ -1801,7 +1801,22 @@ 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);
|
||||
#if ATTACHTOP_PATCH
|
||||
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);
|
||||
#else
|
||||
wl_list_insert(&clients, &c->link);
|
||||
#endif // ATTACHTOP_PATCH
|
||||
wl_list_insert(&fstack, &c->flink);
|
||||
|
||||
/* Set initial monitor, tags, floating status, and focus:
|
||||
|
Reference in New Issue
Block a user