Hi,

On Wed, Jan 19, 2011 at 12:58:40AM -0500, Adam Jackson wrote:
> Signed-off-by: Adam Jackson <[email protected]>
> ---
>  mi/mipointer.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/mi/mipointer.c b/mi/mipointer.c
> index 554397a..1f08133 100644
> --- a/mi/mipointer.c
> +++ b/mi/mipointer.c
> @@ -229,6 +229,10 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr 
> pScreen,
>      SetupScreen (pScreen);
>  
>      GenerateEvent = generateEvent;
> +
> +    if (pScreen->ConstrainCursorHarder)
> +        pScreen->ConstrainCursorHarder(pDev, pScreen, &x, &y);
> +
>      /* device dependent - must pend signal and call miPointerWarpCursor */
>      (*pScreenPriv->screenFuncs->WarpCursor) (pDev, pScreen, x, y);
>      if (!generateEvent)

This looks good to me, except that now I think about it, we might need
CCH in _both_ miPointerSetCursorPosition, and miPointerSetPosition, or a
call to CCH in dix/getevents.c:positionSprite().  We do the right thing
in the event handling path, but without the call (direct or not) from
positionSprite(), we might send out constrained events, but have
unconstrained events recorded in the history, which is bad for any
clients still using pointer hints.

Not that anyone should be using pointer hints at all ever, but still.

Anyway, as far as I can tell, doing it both in SetCursorPosition and
SetPosition covers every possible base (WarpPointer, GetPointerEvents,
as well as making triply sure in every event handler), so with that:
Reviewed-by: Daniel Stone <[email protected]>

Cheers,
Daniel

Attachment: signature.asc
Description: Digital signature

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to