[PATCH 2/6] dix: drop unused argument from XISendDeviceChangedEvent
Peter Hutterer
peter.hutterer at who-t.net
Wed Oct 19 23:25:42 PDT 2011
Instead of device and master (and just using master), drop the master
argument and let the callers pass in the device the event is to be sent for.
No effective functional changes.
Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
Xi/exevents.c | 6 +++---
dix/devices.c | 2 +-
include/exevents.h | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 74a78ec..2ae5a62 100644
--- a/Xi/exevents.c
+++ b/Xi/exevents.c
@@ -651,7 +651,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dc
* Send an XI2 DeviceChangedEvent to all interested clients.
*/
void
-XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChangedEvent *dce)
+XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce)
{
xXIDeviceChangedEvent *dcce;
int rc;
@@ -665,7 +665,7 @@ XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChanged
/* we don't actually swap if there's a NullClient, swapping is done
* later when event is delivered. */
- SendEventToAllWindows(master, XI_DeviceChangedMask, (xEvent*)dcce, 1);
+ SendEventToAllWindows(device, XI_DeviceChangedMask, (xEvent*)dcce, 1);
free(dcce);
}
@@ -699,7 +699,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
/* FIXME: the classes may have changed since we generated the event. */
DeepCopyDeviceClasses(slave, device, dce);
- XISendDeviceChangedEvent(slave, device, dce);
+ XISendDeviceChangedEvent(device, dce);
}
/**
diff --git a/dix/devices.c b/dix/devices.c
index 64557aa..7c196e0 100644
--- a/dix/devices.c
+++ b/dix/devices.c
@@ -2360,7 +2360,7 @@ RecalculateMasterButtons(DeviceIntPtr slave)
event.keys.max_keycode = master->key->xkbInfo->desc->max_key_code;
}
- XISendDeviceChangedEvent(master, master, &event);
+ XISendDeviceChangedEvent(master, &event);
}
}
diff --git a/include/exevents.h b/include/exevents.h
index 4fe6c61..720fb2e 100644
--- a/include/exevents.h
+++ b/include/exevents.h
@@ -322,8 +322,7 @@ extern int
XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
extern void
-XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master,
- DeviceChangedEvent *dce);
+XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce);
extern int
XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,
--
1.7.6.4
More information about the xorg-devel
mailing list