From fcdd2587a17437b643b4592aa7f65d11c05a4cd8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 18 Oct 2011 17:41:29 +1000 Subject: 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 Reviewed-by: Daniel Stone --- 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 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, -- cgit v1.2.3