]> diplodocus.org Git - xorg-xinput/commitdiff
Error out when more than one instance of a name exists
authorBenjamin Close <Benjamin.Close@clearchain.com>
Thu, 12 Mar 2009 11:17:53 +0000 (21:17 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Sat, 21 Mar 2009 12:05:32 +0000 (22:05 +1000)
Previously the check was in place for the duplicate name, however the first
device with the requested name  was still selected regardless.
Correct this by exiting out forcing the user to select by id instead.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
src/xinput.c

index 466a814d891041b23673247ff39a75c368421efb..1ee8bbf8b577bb033685964dca6a6d0f0a00b7b2 100644 (file)
@@ -191,6 +191,7 @@ find_device_info(Display    *display,
                        "Warning: There are multiple devices named \"%s\".\n"
                        "To ensure the correct one is selected, please use "
                        "the device ID instead.\n\n", name);
                        "Warning: There are multiple devices named \"%s\".\n"
                        "To ensure the correct one is selected, please use "
                        "the device ID instead.\n\n", name);
+                return NULL;
            } else {
                found = &devices[loop];
            }
            } else {
                found = &devices[loop];
            }