input: change pointer screen crossing behaviour for multiple ScreenRecs

miPointerSetPosition traditionally took coordinates on a per-screen basis,
triggering a screen switch when these went out-of-bounds. For absolute
devices, this prevented screen crossing in the negative x/y direction.

This patch changes the event generation patch to handle screen coordinates
in a desktop range (i.e. all screens together). Screen switches are
triggered when these coordinates are not on the current screen.

This unifies the pointer behaviour of single ScreenRec multihead and
multiple ScreenRecs multihead in that the cursor by default moves about the
whole screen rather than be confined to one single screen. The
transformation matrix may then be used to actually confine the cursor to the
screen again.

Note: fill_pointer_events has to deal with several different coordinate
systems. Make sure you read the comment before trying to understand the code.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer
2011-10-04 11:41:17 +10:00
parent 6bd0eff40f
commit 401150d7dc
4 changed files with 117 additions and 36 deletions

View File

@@ -534,8 +534,9 @@ typedef struct _DeviceIntRec {
DeviceIntPtr lastSlave; /* last slave device used */
/* last valuator values recorded, not posted to client;
* for slave devices, valuators is in device coordinates
* for master devices, valuators is in screen coordinates
* for slave devices, valuators is in device coordinates, mapped to the
* desktop
* for master devices, valuators is in desktop coordinates.
* see dix/getevents.c
* remainder supports acceleration
*/