bakkeby / dwm-flexipatch

A dwm build with preprocessor directives to decide which patches to include during build time
MIT License
1.18k stars 238 forks source link

more CENTERED_FLOATING_MASTER bugs :) #20

Closed kronikpillow closed 4 years ago

kronikpillow commented 4 years ago

I dunno if this is in the combination with the stacker patch that you just made and I applied it, or in general a bug in the centered floating master, but when you open 4 windows in the centered floating master layout and you then want to close them (killclient) the first 3 windows in the layout get closed, but the 4th wont no matter how many times I press the killclient button, then when I change from tag 1 to tag 2, and back to tag 1, i am able to kill the client that was stuck as a 4th window

bakkeby commented 4 years ago

That's pretty weird. It's caused by the stacker patch, just not sure how and why yet.

bakkeby commented 4 years ago

Actually, it was the layout itself. An oddity where if you detach the very last client from the stack and re-attach it, then the "selected" client on the monitor is not set - hence no operations work on it.

kronikpillow commented 4 years ago

latest commit gets this error

make
dwm build options:
CFLAGS   = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION="6.2" -DXINERAMA
LDFLAGS  = -L/usr/X11R6/lib -lX11 -lXinerama -lfontconfig -lXft -lXrender
CC       = cc
cp config.def.h config.h
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"6.2\" -DXINERAMA drw.c
cc -c -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os -I/usr/X11R6/include -I/usr/include/freetype2 -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_POSIX_C_SOURCE=2 -DVERSION=\"6.2\" -DXINERAMA dwm.c
In file included from patch/include.c:105,
                 from dwm.c:482:
patch/stacker.c: In function ‘focusstack’:
patch/stacker.c:7:60: error: ‘n’ undeclared (first use in this function)
    7 |  snprintf(selmon->ltsymbol, sizeof selmon->ltsymbol, "%d", n);
      |                                                            ^
patch/stacker.c:7:60: note: each undeclared identifier is reported only once for each function it appears in
make: *** [Makefile:18: dwm.o] Error 1
bakkeby commented 4 years ago

Sorry, forgot to remove that.

kronikpillow commented 4 years ago

ok that fixed it :) now the next centered floating master bug introduced is:

when you open 3-4 windows, and you select one window from the stack and killclient, the master gets highlighted as if the focus was on it, but when you killclient it actually kills the 2nd/3rd window in the stack instead of the master

so in other words, after killing 1 window in the stack, unless you return to the master, it keeps closing clients in the stack even thou the focus is on the master

kronikpillow commented 4 years ago

I dunno if I explained it correctly, the blue border is always on the focused window right? so I move the focus in to the stack, kill 1 client from the stack, the blue border returns to the master, but when you killclient it kills the window from the stack, i hope that is better explained

kronikpillow commented 4 years ago

also with mod j & k it behaves like there is a invisible window in the stack, eg I have to press 2 times mod j to switch focus after killing a client

bakkeby commented 4 years ago

Try deleting the two lines I referred to earlier and see if that works for you?

kronikpillow commented 4 years ago

I did a git pull, basically every time you make a commit i git pull right away, so that line is removed

bakkeby commented 4 years ago

I guess I mentioned it in the other issue. I meant to try and delete these two lines to see if it works as you'd expect if they are no longer there. https://github.com/bakkeby/dwm-flexipatch/blob/becbb9bfbfb93cd74932d3ed139d38838e8c1b60/patch/centeredfloatingmaster.c#L82-L83

kronikpillow commented 4 years ago

yes that seems to give the expected behavior, remove it bro :D

bakkeby commented 4 years ago

I have removed this now. I'd have to agree that the stacker patch is more or less essential to make the centered floating master layout practical / useful.

kronikpillow commented 4 years ago

yes it's brutal when you combined together :))

I found 2 more issues, I dunno if they are centered floating master related or not

1 I believe is stacker related, opening new issue