summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-10-18 17:41:29 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-10-25 14:06:41 +1000
commitfcdd2587a17437b643b4592aa7f65d11c05a4cd8 (patch)
tree961be3665050e66128374a16ec2d22438572093d
parent8473e441b0f832775153281bc3df5e2d4feb2b36 (diff)
dix: drop unused argument from XISendDeviceChangedEvent
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@who-t.net> Reviewed-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--Xi/exevents.c6
-rw-r--r--dix/devices.c2
-rw-r--r--include/exevents.h3
3 files changed, 5 insertions, 6 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c
index 74a78ecf2..2ae5a62eb 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 64557aaf1..7c196e077 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 4fe6c61a9..720fb2e5a 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,