On Jan 04 23:27:48, h...@stare.cz wrote:
> Here's some more cleanage for cwm:
> the hmaximize and vmaximize functions are, obviously, completely dual,
> except that hmaximize uses Conf.bwidth when adjusting for a boundary,
> while vmaximize uses cc->bwidth (correctly IMHO).

Also, it seems that unmaximizing always sets cc->bwidth = Conf.bwidth
- there is cc->savegeom to restore from, but no cc->savewidth.

Is that intentional? Do we want every window that returns from
a MAXIMIZED state to obtain the defalut bwidth, even if its width
has been changed in the meantime? Or has the "savebwidth" code
simply not been written yet?

Would it make sense to have cc->savewidth for that purpose,
or should that be another member of cc->savegeom ?

(I always use 1px borders anyway, but it feels a bit
inconsitent to restore all of the geometry/position
but not the border width.)


>       Jan
> 
> 
> Index: client.c
> ===================================================================
> RCS file: /cvs/xenocara/app/cwm/client.c,v
> retrieving revision 1.115
> diff -u -p -r1.115 client.c
> --- client.c  4 Jan 2013 16:30:03 -0000       1.115
> +++ client.c  4 Jan 2013 22:21:29 -0000
> @@ -321,7 +321,7 @@ client_vmaximize(struct client_ctx *cc)
>  
>       /* if this will make us fully maximized then remove boundary */
>       if ((cc->flags & CLIENT_MAXFLAGS) == CLIENT_HMAXIMIZED) {
> -             cc->geom.w += Conf.bwidth * 2;
> +             cc->geom.w += cc->bwidth * 2;
>               cc->bwidth = 0;
>       }

Reply via email to