Re: [dwm] Bug in zoom()

From: Anselm R. Garbe <arg_AT_suckless.org>
Date: Thu, 29 May 2008 19:45:31 +0200

On Thu, May 29, 2008 at 04:05:39PM +0200, Nibble wrote:
> If I press Meta+Return in an empty tag dwm crash, due to zoom() function don't
> check if some client is selected. The attached patch should solve this
> problem. Furthermore, zoom() returns if ismax==true, now.
>
> Kind regards,
> Nibble

> diff -r 7850bc57cbdc dwm.c
> --- a/dwm.c Wed May 28 10:45:18 2008 +0100
> +++ b/dwm.c Thu May 29 16:00:40 2008 +0200
> @@ -1719,7 +1719,7 @@ zoom(const void *arg) {
> zoom(const void *arg) {
> Client *c = sel;
>
> - if(!lt->arrange || sel->isfloating)
> + if(!sel || !lt->arrange || ismax || sel->isfloating)
> return;
> if(c == nexttiled(clients))
> if(!c || !(c = nexttiled(c->next)))

Thanks, I prefer the if as follows:

        if(!lt->arrange || ismax || (sel && sel->isfloating))
                return;

Kind regards,

-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361
Received on Thu May 29 2008 - 19:45:31 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:45:59 UTC