On Mon 2015.11.09 at 00:14 +0100, Vadim Vygonets wrote:
> Dear daemonfishes,
> 
> After using evilwm for a decade, I'm quite impressed with cwm's
> codebase and functionality.  (I just couldn't understand one
> feature: what's the use of ptrmove* if you cannot click?  (...Mr.
> Andersen?))

I've never used this, but maybe someone else cares? The only rationale
is that one can move the pointer with the keyboard, then create a new
window with a keyboard action.

Who knows how much this is used, I could go either way.

> This tiny preliminary patch makes keyboard-based window resizing
> honour size hints, which mouse-based one already does, to let you
> resize xterm character by character.  Specifically:
> 
> - If resize increments are set, multiply the resize deltas by the
>   increments.  I.e., resize* commands use (moveamount * incw) for
>   width and the obvious for height, and bigresize* ten times
>   that.
> - If minimum size is set, don't resize below it.
> 
> Are you interested in something like this?  Would you modify the
> behaviour somehow (e.g., with respect to moveamount)?  Is it OK
> to use the same MAX() macro twice and let the compiler optimize
> it out?

It was excluded from keyboard-based resizing because back then people
wanted micro adjustments to windows - something much easier to do with a
keyboard than mouse.

Personally, I believe (and you might have seen changes to this effect),
that keyboard and mouse actions should result in the same behaviour.
That said, I've lived with the current state since the beginning, so I
don't really care one way or another.

If there are objections, no; else, sure, why not. Though I will state
now that I don't think it warrants a configuration button.

> If you like thie modification, I can try to explain the new
> behaviour in less technical prose and write a man page patch.

No need; we get it :)

Thanks,
Okan

> Vadik.
> 
> -- 
> A friend is someone you call to help you move.  A real friend is
> someone you call to help you move a body.

> ? cwm-incsize.diff
> Index: kbfunc.c
> ===================================================================
> RCS file: /cvs/xenocara/app/cwm/kbfunc.c,v
> retrieving revision 1.118
> diff -u -r1.118 kbfunc.c
> --- kbfunc.c  16 Sep 2015 17:58:25 -0000      1.118
> +++ kbfunc.c  8 Nov 2015 13:18:28 -0000
> @@ -118,10 +118,10 @@
>               client_ptrwarp(cc);
>               break;
>       case CWM_RESIZE:
> -             if ((cc->geom.w += mx) < 1)
> -                     cc->geom.w = 1;
> -             if ((cc->geom.h += my) < 1)
> -                     cc->geom.h = 1;
> +             if ((cc->geom.w += mx * cc->hint.incw) < MAX(1, cc->hint.minw))
> +                     cc->geom.w = MAX(1, cc->hint.minw);
> +             if ((cc->geom.h += my * cc->hint.inch) < MAX(1, cc->hint.minh))
> +                     cc->geom.h = MAX(1, cc->hint.minh);
>               client_resize(cc, 1);
>  
>               /* Make sure the pointer stays within the window. */

Reply via email to