Hi Riccardo,

On Wed, May 09, 2007 at 05:29:08PM +0200, Riccardo Murri wrote:
>  - the "place" patch adds a `place()` function that can be used to
>    instantly move a floating window to a "cardinal point" of the
>    window area.
> 
>    There's a bug with this: the moved window will at times loose
>    focus.  I could not identify the culprit, as the bug seems to
>    manifest itself at random...  Any clue will be appreciated :-)

> +static void
> +_place(const vertical_placement_t vpos, const horizontal_placement_t hpos)
> +{
> +  unsigned int nx, ny;
> +
> +  if(NULL == sel || !sel->isfloating)
> +    return;
> +
> +  /* FIXME: should we take window gravity into account here? */
> +  nx = wax + hpos*(waw - sel->w)/2;
> +  ny = way + vpos*(wah - sel->h)/2;
> +  
> +  XMoveWindow(dpy, sel->win, nx, ny);
     XSync(dpy, False);
     while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
> +}

If you'll add those two lines to your patch, I believe the bug
you describe might be fixed.

Regards,
-- 
 Anselm R. Garbe >< http://www.suckless.org/ >< GPG key: 0D73F361

Reply via email to