mfwm

A tiling fork of dylanaraps sowm.
git clone git://depsterr.com/git/mfwm
Log | Files | Refs | README | LICENSE

commit 3ed4ca5e889e464306ade66a4808de81f4baa4a6
parent cf298eb128397f98443d871f73287bf4988cc798
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Sun, 13 Oct 2019 13:21:37 +0300

docs: update

Diffstat:
Msowm.c | 19+++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/sowm.c b/sowm.c @@ -25,7 +25,7 @@ struct key { typedef struct client client; struct client{ - client *next; + client *next, *prev; Window win; XWindowAttributes a; int f; @@ -177,15 +177,26 @@ void win_del(Window w) { for WIN { if (c->win != w) continue; - if (!c->next && c == list) { + if (!c->prev && !c->next) { free(list); list = 0; + ws_save(desk); + return; + } - } else if (c->next) { + if (!c->prev) { list = c->next; - free(c); + c->next->prev = 0; + + } else if (!c->next) { + c->prev->next = 0; + + } else { + c->prev->next = c->next; + c->next->prev = c->prev; } + free(c); ws_save(desk); return; }