summaryrefslogtreecommitdiff
path: root/man/XListInputDevices.txt
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2016-10-13 13:33:11 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2016-10-13 13:50:06 +1000
commit43904c9c5a0f5750a03a9bd8c96ccda182eb5a9a (patch)
treed44f3efacbf7319a26fc38486e0c02af66033ca4 /man/XListInputDevices.txt
parentb843fe1c0a6b4dbaae9f364042c6a247249305ef (diff)
XListInputDevices: don't touch ndevices in case of error
We used to always set *ndevices to the number of devices returned by the server. This magically worked because we pretty much never returned an error except on faulty server or library implementations. With 19a9cd60 we now have more chances of getting an error, so the polite thing is to just leave *ndevices alone when we error out. Document it as such in the man page, just in case someone accidentally reads it. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> CC: Niels Ole Salscheider <niels_ole@salscheider-online.de> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'man/XListInputDevices.txt')
-rw-r--r--man/XListInputDevices.txt12
1 files changed, 10 insertions, 2 deletions
diff --git a/man/XListInputDevices.txt b/man/XListInputDevices.txt
index 276660d..450f377 100644
--- a/man/XListInputDevices.txt
+++ b/man/XListInputDevices.txt
@@ -220,5 +220,13 @@ DESCRIPTION
Floating. If the device is a master device, attached specifies
the device ID of the master device this device is paired with.
- To free the XDeviceInfo array created by XListInputDevices, use
- XFreeDeviceList.
+RETURN VALUE
+------------
+
+ XListInputDevices returns a pointer to an array of XDeviceInfo
+ structs and sets ndevices_return to the number of elements in
+ that array. To free the XDeviceInfo array created by
+ XListInputDevices, use XFreeDeviceList.
+
+ On error, XListInputDevices returns NULL and ndevices_return is
+ left unmodified.