diff options
-rw-r--r-- | xserver/config/wscons.c | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/xserver/config/wscons.c b/xserver/config/wscons.c index b89b9d1ea..0dfc613ec 100644 --- a/xserver/config/wscons.c +++ b/xserver/config/wscons.c @@ -29,7 +29,6 @@ #include <dev/wscons/wsksymdef.h> #include <sys/ioctl.h> -#include <ctype.h> #include <errno.h> #include <string.h> #include <unistd.h> @@ -122,7 +121,7 @@ wscons_add_keyboard(void) LogMessage(X_INFO, "config/wscons: checking input device %s\n", WSCONS_KBD_DEVICE); - add_option(&options, "name", "Keyboard"); + add_option(&options, "name", WSCONS_KBD_DEVICE); add_option(&options, "driver", "kbd"); config_info = Xprintf("wscons:%s", WSCONS_KBD_DEVICE); @@ -183,13 +182,12 @@ unwind: } static void -wscons_add_pointer(const char *path, const char *driver, int flags, int index) +wscons_add_pointer(const char *path, const char *driver, int flags) { InputAttributes attrs = {}; DeviceIntPtr dev = NULL; InputOption *options = NULL, *tmpo; char *config_info = NULL; - char *name = NULL; int rc; config_info = Xprintf("wscons:%s", path); @@ -199,21 +197,11 @@ wscons_add_pointer(const char *path, const char *driver, int flags, int index) if (!options) return; - if (index >= 0) - name = Xprintf("%s%d", driver, index); - else - name = strdup("mouse"); - if (!name) { - free(options); - free(config_info); - return; - } - name[0] = toupper(name[0]); options->key = strdup("_source"); options->value = strdup("server/wscons"); if (!options->key || !options->value) return; - add_option(&options, "name", name); + add_option(&options, "name", strdup(path)); add_option(&options, "driver", strdup(driver)); add_option(&options, "device", strdup(path)); LogMessage(X_INFO, "config/wscons: checking input device %s\n", path); @@ -263,17 +251,17 @@ wscons_add_pointers(void) case WSMOUSE_TYPE_SYNAPTICS: case WSMOUSE_TYPE_ALPS: wscons_add_pointer(devname, "synaptics", - ATTR_TOUCHPAD, i); + ATTR_TOUCHPAD); break; case WSMOUSE_TYPE_TPANEL: - wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN, i); + wscons_add_pointer(devname, "ws", ATTR_TOUCHSCREEN); break; default: break; } } /* Add a default entry catching all other mux elements as "mouse" */ - wscons_add_pointer(WSCONS_MOUSE_PREFIX, "ws", ATTR_POINTER, -1); + wscons_add_pointer(WSCONS_MOUSE_PREFIX, "mouse", ATTR_POINTER); } int |