bakkeby / patches

Collection of patches for dwm, st and dmenu
284 stars 30 forks source link

crash when hiding window (awesomebar) in deck layout #68

Closed adetabrani closed 1 year ago

adetabrani commented 1 year ago

Hi bakkeby, is awesomebar not compatible with deck layout? I experience a crash every time I try to hide the window

bakkeby commented 1 year ago

The awesomebar patch has historically had a few issues causing crashes. Which patch in particular are you using?

adetabrani commented 1 year ago

dwm-awesomebar-20230431-6.4.diff I'm using this version with your alpha deck patch

bakkeby commented 1 year ago

Hi @adetabrani,

I can reproduce and compatibility wise there is a need for an addition check to see if the client is hidden when traversing the stack.

diff --git a/dwm.c b/dwm.c
index 93435bb..4353270 100644
--- a/dwm.c
+++ b/dwm.c
@@ -700,7 +700,7 @@ deck(Monitor *m) {
                        XMoveWindow(dpy, c->win, WIDTH(c) * -2, c->y);

        for (s = m->stack; s; s = s->snext) {
-               if (!ISVISIBLE(s) || s->isfloating)
+               if (!ISVISIBLE(s) || s->isfloating || HIDDEN(s))
                        continue;

                for (i = my = 0, c = nexttiled(m->clients); c && c != s; c = nexttiled(c->next), i++);

With that it seems to work just fine.

adetabrani commented 1 year ago

Thanks, works very well