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>
This commit is contained in:
Peter Hutterer 2011-10-18 17:41:29 +10:00
parent 8473e441b0
commit fcdd2587a1
3 changed files with 5 additions and 6 deletions

View File

@ -651,7 +651,7 @@ DeepCopyDeviceClasses(DeviceIntPtr from, DeviceIntPtr to, DeviceChangedEvent *dc
* Send an XI2 DeviceChangedEvent to all interested clients. * Send an XI2 DeviceChangedEvent to all interested clients.
*/ */
void void
XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChangedEvent *dce) XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce)
{ {
xXIDeviceChangedEvent *dcce; xXIDeviceChangedEvent *dcce;
int rc; 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 /* we don't actually swap if there's a NullClient, swapping is done
* later when event is delivered. */ * later when event is delivered. */
SendEventToAllWindows(master, XI_DeviceChangedMask, (xEvent*)dcce, 1); SendEventToAllWindows(device, XI_DeviceChangedMask, (xEvent*)dcce, 1);
free(dcce); free(dcce);
} }
@ -699,7 +699,7 @@ ChangeMasterDeviceClasses(DeviceIntPtr device, DeviceChangedEvent *dce)
/* FIXME: the classes may have changed since we generated the event. */ /* FIXME: the classes may have changed since we generated the event. */
DeepCopyDeviceClasses(slave, device, dce); DeepCopyDeviceClasses(slave, device, dce);
XISendDeviceChangedEvent(slave, device, dce); XISendDeviceChangedEvent(device, dce);
} }
/** /**

View File

@ -2360,7 +2360,7 @@ RecalculateMasterButtons(DeviceIntPtr slave)
event.keys.max_keycode = master->key->xkbInfo->desc->max_key_code; event.keys.max_keycode = master->key->xkbInfo->desc->max_key_code;
} }
XISendDeviceChangedEvent(master, master, &event); XISendDeviceChangedEvent(master, &event);
} }
} }

View File

@ -322,8 +322,7 @@ extern int
XIShouldNotify(ClientPtr client, DeviceIntPtr dev); XIShouldNotify(ClientPtr client, DeviceIntPtr dev);
extern void extern void
XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, XISendDeviceChangedEvent(DeviceIntPtr device, DeviceChangedEvent *dce);
DeviceChangedEvent *dce);
extern int extern int
XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client,