On Sat, Nov 12, 2016 at 05:25:16PM +0100, Carlos Garnacho wrote:
> If the root window borderClip region is null, the PointInWindowIsVisible()
> check fails if pointer warping is attempted on the root window, making
> the warping operation bail out early.
> 
> Assume coordinates always lay inside the root window for this case,
> the actual position will be clamped later within screen coordinates anyway.
> 
> Signed-off-by: Carlos Garnacho <carl...@gnome.org>
> ---
> 
> I'm honestly unsure about this one. hw/xwayland/xwayland.c explicitly
> sets borderClip to a null region, I tried initializing it similarly to
> how 4/7 does with winSize, but I got crashes in glamor paths.
> 
> Perhaps I'm going in the opposite direction than I should to get this
> fixed, I don't know how do other rootless implementations deal with this,
> however the condition change seemed safe to assume generically.
> 
>  dix/events.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/dix/events.c b/dix/events.c
> index cc26ba5..3e3a01e 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -3575,7 +3575,7 @@ ProcWarpPointer(ClientPtr client)
>               winX + stuff->srcX + (int) stuff->srcWidth < x) ||
>              (stuff->srcHeight != 0 &&
>               winY + stuff->srcY + (int) stuff->srcHeight < y) ||
> -            !PointInWindowIsVisible(source, x, y))
> +            (source->parent && !PointInWindowIsVisible(source, x, y)))

This gets clipped off by the context but the check for being on separate
screens is done beforehand, so if we get here we can assume that the pointer
is on the same screen as the source window. So this looks good on its own,
but I'm not sure about the other comments above.

Acked-by: Peter Hutterer <peter.hutte...@who-t.net>

Cheers,
   Peter

>              return Success;
>      }
>      if (dest) {
> -- 
> 2.9.3
> 
> _______________________________________________
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
> 
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to