aboutsummaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-09-29 11:27:00 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-09-29 11:27:00 +0530
commitc6e5f172a23a885c7ac3867d876026287b9cad64 (patch)
treeed5b468d036dc86492dc541028338ac0121eb9d2 /dwl.c
parent07e4c047eb7cddf10a3a3ef0f396a6b7db658f1c (diff)
(patch): attachbottom.patch
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index babb30f..13dce0d 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1726,7 +1726,11 @@ 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 (clients.prev)
+ // tile at the bottom
+ wl_list_insert(clients.prev, &c->link);
+ else
+ wl_list_insert(&clients, &c->link);
wl_list_insert(&fstack, &c->flink);
/* Set initial monitor, tags, floating status, and focus: