On Sat, Oct 03, 2009 at 03:06:55AM +0100, Thomas Adam wrote:
> 2009/10/2 Duane Tarr <[email protected]>:
> > Thanks for the reply, Thomas.
>
> Can you please make sure you don't cull the Cc list -- which means
> ensuring you *reply* on-list in the future, please? I am actually
> adding in fvwm-workers so I don't lose track of this email.
The Cc: was empty, and I did not notice the addition to the To:. This
reply should be better.
> > I tried what you said for 2.5.27, but the Vim window still runs off the
> > bottom edge.
>
> I've been able to reproduce this with your config. The mathematics
> involved in calculating the offsets is quite complicated, and I won't
> claim I fully understand the logic. However, please would you get the
> CVS version of FVWM and apply the patch attached along with this
> email?
>
> >From my limited testing, this *seems* to work, but I would like it
> tested more before I think about committing it to CVS.
Thanks for the patch. It mostly works. Occasionally, some app will run
off of the bottom as your comment notes. This is fairly rare, so not
much of a big deal. Why would the best_policy permit a run off of the
screen in any case?
Using the patch, there seems to be some "shyness" about placing the
right edge of a new window against the right edge of the screen. This
holds for all apps. It's about 50 pixels on my setup.
>
> -- Thomas Adam
> Index: fvwm/placement.c
> ===================================================================
> RCS file: /home/cvs/fvwm/fvwm/fvwm/placement.c,v
> retrieving revision 1.170
> diff -u -r1.170 placement.c
> --- fvwm/placement.c 19 Feb 2009 21:06:02 -0000 1.170
> +++ fvwm/placement.c 3 Oct 2009 01:54:51 -0000
> @@ -867,15 +867,21 @@
> ret_p->x = __pl_minoverlap_get_next_x(arg);
> ret_p->y = arg->place_g.y;
> }
> - if (ret_p->x + arg->place_g.width > arg->page_p2.x)
> + if (ret_p->x + arg->place_g.width >= arg->page_p2.x)
> {
> /* out of room in x direction. Try next y. Reset x.*/
> ret_p->x = arg->page_p1.x;
> ret_p->y = __pl_minoverlap_get_next_y(arg);
> }
> - if (ret_p->y + arg->place_g.height > arg->page_p2.y)
> + if (ret_p->y + arg->place_g.height >= arg->page_p2.y)
> {
> /* PageBottom */
> + /* TA: 20091003: Ensure we just set the y-coordinate back to
> + * where it was meant to be -- effectively *try* and keep it
> + * on screen, but there's no guarantee of that here because of
> + * how best_policy is then checked for!
> + */
> + ret_p->y = arg->place_g.y;
> return PL_LOOP_END;
> }
>