summaryrefslogtreecommitdiff
path: root/Xi
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 /Xi
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 'Xi')
-rw-r--r--Xi/exevents.c2
-rw-r--r--Xi/xichangehierarchy.c4
-rw-r--r--Xi/xiquerydevice.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 0df65791a..736896092 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -716,7 +716,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
if (IsFloating(slave))
return; /* set floating since the event */
- if (slave->u.master->id != dce->masterid)
+ if (GetMaster(slave, MASTER_ATTACHED)->id != dce->masterid)
return; /* not our slave anymore, don't care */
/* FIXME: we probably need to send a DCE for the new slave now */
diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c
index b9cdedf77..6683f6a5c 100644
--- a/Xi/xichangehierarchy.c
+++ b/Xi/xichangehierarchy.c
@@ -282,12 +282,12 @@ remove_master(ClientPtr client, xXIRemoveMasterInfo *r,
for (attached = inputInfo.devices; attached; attached = attached->next)
{
if (!IsMaster(attached)) {
- if (attached->u.master == ptr)
+ if (GetMaster(attached, MASTER_ATTACHED) == ptr)
{
AttachDevice(client, attached, newptr);
flags[attached->id] |= XISlaveAttached;
}
- if (attached->u.master == keybd)
+ if (GetMaster(attached, MASTER_ATTACHED) == keybd)
{
AttachDevice(client, attached, newkeybd);
flags[attached->id] |= XISlaveAttached;
diff --git a/Xi/xiquerydevice.c b/Xi/xiquerydevice.c
index 3cad8d7f1..8b5421130 100644
--- a/Xi/xiquerydevice.c
+++ b/Xi/xiquerydevice.c
@@ -375,7 +375,7 @@ SwapValuatorInfo(DeviceIntPtr dev, xXIValuatorInfo* info)
int GetDeviceUse(DeviceIntPtr dev, uint16_t *attachment)
{
- DeviceIntPtr master = dev->u.master;
+ DeviceIntPtr master = GetMaster(dev, MASTER_ATTACHED);
int use;
if (IsMaster(dev))