randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition master
authorRui Matos <tiagomatos@gmail.com>
Tue, 1 Nov 2011 21:32:36 +0000 (21:32 +0000)
committerKeith Packard <keithp@keithp.com>
Thu, 3 Nov 2011 21:12:21 +0000 (14:12 -0700)
commit9cc44b955b27de33348d6a20bebc9704930ee18e
tree40e5f71483ae4da415aef1969e849e735a945fb4
parent548c6fe044068ffba9b5306dc6b11f2ba22782a4
randr: Make the RRConstrainCursorHarder logic the same as miPointerSetPosition

The constraining logic in RRConstrainCursorHarder allows the cursor to reach
crtc positions of x = width and y = height while the constraining code in
miPointerSetPosition only allows it to reach x = width - 1 and y = height - 1
for the analogous screen case.

This patch makes the former's logic equivalent to the latter's which allows
applications to benefit from Fitts's law. E.g. a maximized application
adjacent to a crtc border wouldn't get pointer events if the user moved the
pointer all the way until it's contained.

Signed-off-by: Rui Matos <tiagomatos@gmail.com>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Keith Packard <keithp@keithp.com>
randr/rrcrtc.c