Move master/lastSlave out of the union into separate fields.

The removal of the double-use will cause some suble bugs as some conditions
to check for the dev->u.master case were broken and also evaluated as true
if lastSlave was set (instead of master).

Also breaks the input ABI.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
This commit is contained in:
Peter Hutterer 2011-02-18 12:28:43 +10:00
commit 17265ccb02
9 changed files with 18 additions and 20 deletions

View file

@ -530,10 +530,8 @@ typedef struct _DeviceIntRec {
PrivateRec *devPrivates;
DeviceUnwrapProc unwrapProc;
SpriteInfoPtr spriteInfo;
union {
DeviceIntPtr master; /* master device */
DeviceIntPtr lastSlave; /* last slave device used */
} u;
DeviceIntPtr master; /* master device */
DeviceIntPtr lastSlave; /* last slave device used */
/* last valuator values recorded, not posted to client;
* for slave devices, valuators is in device coordinates