summaryrefslogtreecommitdiff
path: root/Xi/listdev.c
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2009-02-20 16:07:33 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-03-20 15:17:55 +1000
commit38bba0c1b75b84e8bbdfa7975cf701a9414a3afd (patch)
tree8d9f6b47c58b93f123e9b2966b6997061e1c4089 /Xi/listdev.c
parent181e41511d5772962b8bc998a1940d2a9ba62d5e (diff)
Xi: Change ChangeMasterDeviceClasses to new XI2 events.
Split ChangeMasterDeviceClasses into an extra XISendDeviceChangedEvent that assembles the XI2 wire event for the DeviceChanged event. Re-use this when detaching the last SD. Not quite perfect yet, we still copy the device classes from the slave now rather than from the data we had when the event occured. But it's a start. (We can now unexport SizeDeviceInfo and CopySwapDevices, not needed anymore) Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi/listdev.c')
-rw-r--r--Xi/listdev.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/Xi/listdev.c b/Xi/listdev.c
index 925d0ecbf..e7d0a9d68 100644
--- a/Xi/listdev.c
+++ b/Xi/listdev.c
@@ -93,7 +93,7 @@ SProcXListInputDevices(ClientPtr client)
*
*/
-void
+static void
SizeDeviceInfo(DeviceIntPtr d, int *namesize, int *size)
{
int chunks;
@@ -273,22 +273,7 @@ CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf)
return (i);
}
-/***********************************************************************
- *
- * This procedure lists information to be returned for an input device.
- *
- */
-
static void
-ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev,
- char **devbuf, char **classbuf, char **namebuf)
-{
- CopyDeviceName(namebuf, d->name);
- CopySwapDevice(client, d, 0, devbuf);
- CopySwapClasses(client, d, &dev->num_classes, classbuf);
-}
-
-void
CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes,
char** classbuf)
{
@@ -308,6 +293,22 @@ CopySwapClasses(ClientPtr client, DeviceIntPtr dev, CARD8 *num_classes,
/***********************************************************************
*
+ * This procedure lists information to be returned for an input device.
+ *
+ */
+
+static void
+ListDeviceInfo(ClientPtr client, DeviceIntPtr d, xDeviceInfoPtr dev,
+ char **devbuf, char **classbuf, char **namebuf)
+{
+ CopyDeviceName(namebuf, d->name);
+ CopySwapDevice(client, d, 0, devbuf);
+ CopySwapClasses(client, d, &dev->num_classes, classbuf);
+}
+
+
+/***********************************************************************
+ *
* This procedure lists the input devices available to the server.
*
* If this request is called by a client that has not issued a