You're right - I should not have submitted the patch with a bug that would crash DWM. However, it was only with seven clients or more and as I rarely have more than 3 open at once, for me it wasn't that big of an issue. I have now fixed it, though. I did that by having setsmfact() check the amount of clients and have it set an appropriate limit. It still crashes, but this time it only this when you have 30 or more clients in your stack which I think is highly unlikely and thus, a save approach. If you really want to eliminate the crashing, you would have to have tile() report the height of the clients in the stack and if(h < MIN_WIN_SIZE) then do something.
Regarding to other limitation, it is both based on my personal workflow (I tend to use that bottom client more than the top ones - probably because I also use the attachaside patch) and because I knew how to detect this bottom client. I guess anyone could easily modify the patch so it works from the top client up, should they want to do so.
I have attached the new version. Again, I look forward to hearing your feedback!
Greetings,
Jente
> Date: Wed, 27 Mar 2013 08:41:50 +0000
> Subject: Re: [dev] [DWM] Patch: stack mfact
> From: raphlalou_AT_gmail.com
> To: dev_AT_suckless.org
>
> On Tue, Mar 26, 2013 at 7:17 PM, Jente Hidskes <jthidskes_AT_outlook.com> wrote:
> > First of all, when there is an X number of clients in the stack and smfact
> > (stackmfact) is increased too much, it will crash DWM. This could be fixed
> > by having setsmfact() detect the amount of stacked clients and having it set
> > a limit to smfact accordingly.
>
> Not sure it should be upstreamed as is then. Upstreaming a patch that causes
> (new) crash is unusual (for any project, suckless or otherwise).
>
> > Two limitations are that only the bottom
> > client in the stack can be resized (for me personally this is not an issue)
>
> Was this choice implementation driven? (i.e. "because it is easier to detect
> the bottom client rather than the top")
>
> Considering it's easier to push a client to the top of the stack (zoom twice)
> it'd be (IMHO) nicer to resize the top client.
>
>
> Cheers,
> --
> ______________
> Raphaël Proust
>
Received on Wed Mar 27 2013 - 14:17:36 CET