summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-02-18 11:45:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-02-22 14:35:45 +1000
commit77113dd3eef03dd65b556b672d976817b3f4542e (patch)
treefb1a4039af4f6ae7dd7af57a78ecde827faf0743 /mi
parent2936635698619271a790004480a14285149277cb (diff)
input: Change a bunch of direct dev->u.master accesses to use GetMaster()
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Benjamin Tissoires <tissoire@cena.fr>
Diffstat (limited to 'mi')
-rw-r--r--mi/mieq.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 6853103a5..a3e60855d 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -321,6 +321,7 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
DeviceIntPtr mdev;
int len = original->any.length;
int type = original->any.type;
+ int mtype; /* which master type? */
CHECKEVENT(original);
@@ -337,20 +338,21 @@ CopyGetMasterEvent(DeviceIntPtr sdev,
{
case ET_KeyPress:
case ET_KeyRelease:
- mdev = GetMaster(sdev, MASTER_KEYBOARD);
+ mtype = MASTER_KEYBOARD;
break;
case ET_ButtonPress:
case ET_ButtonRelease:
case ET_Motion:
case ET_ProximityIn:
case ET_ProximityOut:
- mdev = GetMaster(sdev, MASTER_POINTER);
+ mtype = MASTER_POINTER;
break;
default:
- mdev = sdev->u.master;
+ mtype = MASTER_ATTACHED;
break;
}
+ mdev = GetMaster(sdev, mtype);
memcpy(copy, original, len);
ChangeDeviceID(mdev, copy);
FixUpEventForMaster(mdev, sdev, original, copy);
@@ -466,7 +468,7 @@ mieqProcessInputEvents(void)
pthread_mutex_unlock(&miEventQueueMutex);
#endif
- master = (dev && !IsMaster(dev) && dev->u.master) ? dev->u.master : NULL;
+ master = (dev) ? GetMaster(dev, MASTER_ATTACHED) : NULL;
if (screenIsSaved == SCREEN_SAVER_ON)
dixSaveScreens (serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);