Hi Carlos,

Thanks for your time reviewing those patches, and apologizes for poor commit 
messages, as I do realize it unnecessarily eats up the reviewers' time.
Here is a (verbose !) comment for that 2-character change.

    BF for "can't dock anything when xinerama mirrors monitors"
    
    Bug description: when xinerama mirrors screens on two monitors,
    wGetRectPlacementInfo sets the XFLAG_PARTIAL flag pretty much
    systematically. A user visible consequence is that it is impossible to
    dock any appicon.
    
    Cause: when trying to dock, wDockSnapIcon calls wGetRectPlacementInfo to
    "check if the icon is outside the screen boundaries". It will refuse to
    dock if the XFLAG_PARTIAL flag is set, which is supposed to mean that
    the appicon is not fully displayed. The problem is the way
    wGetRectPlacementInfo determines when to set that flag. For the given
    window, it adds the area displayed on each head, and compares the sum
    (stored in variable `area') to the expected sum (rh * rw). When screens
    are mirrored, area will end up being 2 * rh * rw, thus failing the test.
    Testing area < rh * rw fixes that. Note that it is still not perfect: if
    half of a rectangle is mirrored, the partial flag will wrongly _not_ be
    set.

When I'm done rebasing the patches on top of vnext and fixing the indentation, 
I'll send them again, with the above comment for this patch.

-- Daniel

----- Mail original -----
> On Fri, 22 Mar 2013 at 23:23:33 +0100, [email protected] wrote:
> > From: Daniel Déchelotte <[email protected]>
> 
> Can you explain a bit what is going on here?
> 
> 
> > ---
> >  src/xinerama.c |    2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/xinerama.c b/src/xinerama.c
> > index 4bd9ca4..4736a60 100644
> > --- a/src/xinerama.c
> > +++ b/src/xinerama.c
> > @@ -135,7 +135,7 @@ int wGetRectPlacementInfo(WScreen * scr, WMRect
> > rect, int *flags)
> >     if (best == -1) {
> >             *flags |= XFLAG_DEAD;
> >             best = wGetHeadForPointerLocation(scr);
> > -   } else if (totalArea != rw * rh)
> > +   } else if (totalArea < rw * rh)
> >             *flags |= XFLAG_PARTIAL;
> >  
> >     return best;
> > --
> > 1.7.10.4
> > 
> > 
> > --
> > To unsubscribe, send mail to
> > [email protected].
> 
> 
> --
> To unsubscribe, send mail to
> [email protected].
> 


--
To unsubscribe, send mail to [email protected].

Reply via email to