[PATCH] [DIX/ConfineTo] Don't bother about the bounding box when grabbing a shaped window

Keith Packard keithp at keithp.com
Fri Feb 7 16:41:48 PST 2014


Egbert Eich <eich at freedesktop.org> writes:

> Limiting the the cursor coordinates on the bounding box of a shaped
> window before applying ConfineTo leads to strange cursor placement
> when the pointer is located outside  the vertial and horizontal
> strip of this bounding box.
> Ignoring the bounding box when a shape is set leads to the correct
> behavior.

This seems reasonable to me.

> -        pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
> +        if (!wBoundingShape(pWin))
> +            pSprite->hotLimits = *RegionExtents(&pWin->borderSize);

This seems like a bad idea to me -- hotLimits is used in calls to
pScreen->CursorLimits, and you're now not setting it when the new window
has a bounding shape. I don't think this will cause a problem, but I'm
not sure what this change accomplishes as physLimits (which is computed
by CursorLimits from hotLimits) is never used when the window has a
bounding shape. I suggest just leaving hotLimits set as it was, in case
some driver actually cares about it.

Everything else is

Reviewed-by: Keith Packard <keithp at keithp.com>

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140207/ffef7354/attachment.pgp>


More information about the xorg-devel mailing list